Adaptive Genesis Engine [AGE]ADAPTIVE GENESIS ENGINE (AGE)
Pure Signal Evolution Through Genetic Algorithms
Where Darwin Meets Technical Analysis
🧬 WHAT YOU'RE GETTING - THE PURE INDICATOR
This is a technical analysis indicator - it generates signals, visualizes probability, and shows you the evolutionary process in real-time. This is NOT a strategy with automatic execution - it's a sophisticated signal generation system that you control .
What This Indicator Does:
Generates Long/Short entry signals with probability scores (35-88% range)
Evolves a population of up to 12 competing strategies using genetic algorithms
Validates strategies through walk-forward optimization (train/test cycles)
Visualizes signal quality through premium gradient clouds and confidence halos
Displays comprehensive metrics via enhanced dashboard
Provides alerts for entries and exits
Works on any timeframe, any instrument, any broker
What This Indicator Does NOT Do:
Execute trades automatically
Manage positions or calculate position sizes
Place orders on your behalf
Make trading decisions for you
This is pure signal intelligence. AGE tells you when and how confident it is. You decide whether and how much to trade.
🔬 THE SCIENCE: GENETIC ALGORITHMS MEET TECHNICAL ANALYSIS
What Makes This Different - The Evolutionary Foundation
Most indicators are static - they use the same parameters forever, regardless of market conditions. AGE is alive . It maintains a population of competing strategies that evolve, adapt, and improve through natural selection principles:
Birth: New strategies spawn through crossover breeding (combining DNA from fit parents) plus random mutation for exploration
Life: Each strategy trades virtually via shadow portfolios, accumulating wins/losses, tracking drawdown, and building performance history
Selection: Strategies are ranked by comprehensive fitness scoring (win rate, expectancy, drawdown control, signal efficiency)
Death: Weak strategies are culled periodically, with elite performers (top 2 by default) protected from removal
Evolution: The gene pool continuously improves as successful traits propagate and unsuccessful ones die out
This is not curve-fitting. Each new strategy must prove itself on out-of-sample data through walk-forward validation before being trusted for live signals.
🧪 THE DNA: WHAT EVOLVES
Every strategy carries a 10-gene chromosome controlling how it interprets market data:
Signal Sensitivity Genes
Entropy Sensitivity (0.5-2.0): Weight given to market order/disorder calculations. Low values = conservative, require strong directional clarity. High values = aggressive, act on weaker order signals.
Momentum Sensitivity (0.5-2.0): Weight given to RSI/ROC/MACD composite. Controls responsiveness to momentum shifts vs. mean-reversion setups.
Structure Sensitivity (0.5-2.0): Weight given to support/resistance positioning. Determines how much price location within swing range matters.
Probability Adjustment Genes
Probability Boost (-0.10 to +0.10): Inherent bias toward aggressive (+) or conservative (-) entries. Acts as personality trait - some strategies naturally optimistic, others pessimistic.
Trend Strength Requirement (0.3-0.8): Minimum trend conviction needed before signaling. Higher values = only trades strong trends, lower values = acts in weak/sideways markets.
Volume Filter (0.5-1.5): Strictness of volume confirmation. Higher values = requires strong volume, lower values = volume less important.
Risk Management Genes
ATR Multiplier (1.5-4.0): Base volatility scaling for all price levels. Controls whether strategy uses tight or wide stops/targets relative to ATR.
Stop Multiplier (1.0-2.5): Stop loss tightness. Lower values = aggressive profit protection, higher values = more breathing room.
Target Multiplier (1.5-4.0): Profit target ambition. Lower values = quick scalping exits, higher values = swing trading holds.
Adaptation Gene
Regime Adaptation (0.0-1.0): How much strategy adjusts behavior based on detected market regime (trending/volatile/choppy). Higher values = more reactive to regime changes.
The Magic: AGE doesn't just try random combinations. Through tournament selection and fitness-weighted crossover, successful gene combinations spread through the population while unsuccessful ones fade away. Over 50-100 bars, you'll see the population converge toward genes that work for YOUR instrument and timeframe.
📊 THE SIGNAL ENGINE: THREE-LAYER SYNTHESIS
Before any strategy generates a signal, AGE calculates probability through multi-indicator confluence:
Layer 1 - Market Entropy (Information Theory)
Measures whether price movements exhibit directional order or random walk characteristics:
The Math:
Shannon Entropy = -Σ(p × log(p))
Market Order = 1 - (Entropy / 0.693)
What It Means:
High entropy = choppy, random market → low confidence signals
Low entropy = directional market → high confidence signals
Direction determined by up-move vs down-move dominance over lookback period (default: 20 bars)
Signal Output: -1.0 to +1.0 (bearish order to bullish order)
Layer 2 - Momentum Synthesis
Combines three momentum indicators into single composite score:
Components:
RSI (40% weight): Normalized to -1/+1 scale using (RSI-50)/50
Rate of Change (30% weight): Percentage change over lookback (default: 14 bars), clamped to ±1
MACD Histogram (30% weight): Fast(12) - Slow(26), normalized by ATR
Why This Matters: RSI catches mean-reversion opportunities, ROC catches raw momentum, MACD catches momentum divergence. Weighting favors RSI for reliability while keeping other perspectives.
Signal Output: -1.0 to +1.0 (strong bearish to strong bullish)
Layer 3 - Structure Analysis
Evaluates price position within swing range (default: 50-bar lookback):
Position Classification:
Bottom 20% of range = Support Zone → bullish bounce potential
Top 20% of range = Resistance Zone → bearish rejection potential
Middle 60% = Neutral Zone → breakout/breakdown monitoring
Signal Logic:
At support + bullish candle = +0.7 (strong buy setup)
At resistance + bearish candle = -0.7 (strong sell setup)
Breaking above range highs = +0.5 (breakout confirmation)
Breaking below range lows = -0.5 (breakdown confirmation)
Consolidation within range = ±0.3 (weak directional bias)
Signal Output: -1.0 to +1.0 (bearish structure to bullish structure)
Confluence Voting System
Each layer casts a vote (Long/Short/Neutral). The system requires minimum 2-of-3 agreement (configurable 1-3) before generating a signal:
Examples:
Entropy: Bullish, Momentum: Bullish, Structure: Neutral → Signal generated (2 long votes)
Entropy: Bearish, Momentum: Neutral, Structure: Neutral → No signal (only 1 short vote)
All three bullish → Signal generated with +5% probability bonus
This is the key to quality. Single indicators give too many false signals. Triple confirmation dramatically improves accuracy.
📈 PROBABILITY CALCULATION: HOW CONFIDENCE IS MEASURED
Base Probability:
Raw_Prob = 50% + (Average_Signal_Strength × 25%)
Then AGE applies strategic adjustments:
Trend Alignment:
Signal with trend: +4%
Signal against strong trend: -8%
Weak/no trend: no adjustment
Regime Adaptation:
Trending market (efficiency >50%, moderate vol): +3%
Volatile market (vol ratio >1.5x): -5%
Choppy market (low efficiency): -2%
Volume Confirmation:
Volume > 70% of 20-bar SMA: no change
Volume below threshold: -3%
Volatility State (DVS Ratio):
High vol (>1.8x baseline): -4% (reduce confidence in chaos)
Low vol (<0.7x baseline): -2% (markets can whipsaw in compression)
Moderate elevated vol (1.0-1.3x): +2% (trending conditions emerging)
Confluence Bonus:
All 3 indicators agree: +5%
2 of 3 agree: +2%
Strategy Gene Adjustment:
Probability Boost gene: -10% to +10%
Regime Adaptation gene: scales regime adjustments by 0-100%
Final Probability: Clamped between 35% (minimum) and 88% (maximum)
Why These Ranges?
Below 35% = too uncertain, better not to signal
Above 88% = unrealistic, creates overconfidence
Sweet spot: 65-80% for quality entries
🔄 THE SHADOW PORTFOLIO SYSTEM: HOW STRATEGIES COMPETE
Each active strategy maintains a virtual trading account that executes in parallel with real-time data:
Shadow Trading Mechanics
Entry Logic:
Calculate signal direction, probability, and confluence using strategy's unique DNA
Check if signal meets quality gate:
Probability ≥ configured minimum threshold (default: 65%)
Confluence ≥ configured minimum (default: 2 of 3)
Direction is not zero (must be long or short, not neutral)
Verify signal persistence:
Base requirement: 2 bars (configurable 1-5)
Adapts based on probability: high-prob signals (75%+) enter 1 bar faster, low-prob signals need 1 bar more
Adjusts for regime: trending markets reduce persistence by 1, volatile markets add 1
Apply additional filters:
Trend strength must exceed strategy's requirement gene
Regime filter: if volatile market detected, probability must be 72%+ to override
Volume confirmation required (volume > 70% of average)
If all conditions met for required persistence bars, enter shadow position at current close price
Position Management:
Entry Price: Recorded at close of entry bar
Stop Loss: ATR-based distance = ATR × ATR_Mult (gene) × Stop_Mult (gene) × DVS_Ratio
Take Profit: ATR-based distance = ATR × ATR_Mult (gene) × Target_Mult (gene) × DVS_Ratio
Position: +1 (long) or -1 (short), only one at a time per strategy
Exit Logic:
Check if price hit stop (on low) or target (on high) on current bar
Record trade outcome in R-multiples (profit/loss normalized by ATR)
Update performance metrics:
Total trades counter incremented
Wins counter (if profit > 0)
Cumulative P&L updated
Peak equity tracked (for drawdown calculation)
Maximum drawdown from peak recorded
Enter cooldown period (default: 8 bars, configurable 3-20) before next entry allowed
Reset signal age counter to zero
Walk-Forward Tracking:
During position lifecycle, trades are categorized:
Training Phase (first 250 bars): Trade counted toward training metrics
Testing Phase (next 75 bars): Trade counted toward testing metrics (out-of-sample)
Live Phase (after WFO period): Trade counted toward overall metrics
Why Shadow Portfolios?
No lookahead bias (uses only data available at the bar)
Realistic execution simulation (entry on close, stop/target checks on high/low)
Independent performance tracking for true fitness comparison
Allows safe experimentation without risking capital
Each strategy learns from its own experience
🏆 FITNESS SCORING: HOW STRATEGIES ARE RANKED
Fitness is not just win rate. AGE uses a comprehensive multi-factor scoring system:
Core Metrics (Minimum 3 trades required)
Win Rate (30% of fitness):
WinRate = Wins / TotalTrades
Normalized directly (0.0-1.0 scale)
Total P&L (30% of fitness):
Normalized_PnL = (PnL + 300) / 600
Clamped 0.0-1.0. Assumes P&L range of -300R to +300R for normalization scale.
Expectancy (25% of fitness):
Expectancy = Total_PnL / Total_Trades
Normalized_Expectancy = (Expectancy + 30) / 60
Clamped 0.0-1.0. Rewards consistency of profit per trade.
Drawdown Control (15% of fitness):
Normalized_DD = 1 - (Max_Drawdown / 15)
Clamped 0.0-1.0. Penalizes strategies that suffer large equity retracements from peak.
Sample Size Adjustment
Quality Factor:
<50 trades: 1.0 (full weight, small sample)
50-100 trades: 0.95 (slight penalty for medium sample)
100 trades: 0.85 (larger penalty for large sample)
Why penalize more trades? Prevents strategies from gaming the system by taking hundreds of tiny trades to inflate statistics. Favors quality over quantity.
Bonus Adjustments
Walk-Forward Validation Bonus:
if (WFO_Validated):
Fitness += (WFO_Efficiency - 0.5) × 0.1
Strategies proven on out-of-sample data receive up to +10% fitness boost based on test/train efficiency ratio.
Signal Efficiency Bonus (if diagnostics enabled):
if (Signals_Evaluated > 10):
Pass_Rate = Signals_Passed / Signals_Evaluated
Fitness += (Pass_Rate - 0.1) × 0.05
Rewards strategies that generate high-quality signals passing the quality gate, not just profitable trades.
Final Fitness: Clamped at 0.0 minimum (prevents negative fitness values)
Result: Elite strategies typically achieve 0.50-0.75 fitness. Anything above 0.60 is excellent. Below 0.30 is prime candidate for culling.
🔬 WALK-FORWARD OPTIMIZATION: ANTI-OVERFITTING PROTECTION
This is what separates AGE from curve-fitted garbage indicators.
The Three-Phase Process
Every new strategy undergoes a rigorous validation lifecycle:
Phase 1 - Training Window (First 250 bars, configurable 100-500):
Strategy trades normally via shadow portfolio
All trades count toward training performance metrics
System learns which gene combinations produce profitable patterns
Tracks independently: Training_Trades, Training_Wins, Training_PnL
Phase 2 - Testing Window (Next 75 bars, configurable 30-200):
Strategy continues trading without any parameter changes
Trades now count toward testing performance metrics (separate tracking)
This is out-of-sample data - strategy has never seen these bars during "optimization"
Tracks independently: Testing_Trades, Testing_Wins, Testing_PnL
Phase 3 - Validation Check:
Minimum_Trades = 5 (configurable 3-15)
IF (Train_Trades >= Minimum AND Test_Trades >= Minimum):
WR_Efficiency = Test_WinRate / Train_WinRate
Expectancy_Efficiency = Test_Expectancy / Train_Expectancy
WFO_Efficiency = (WR_Efficiency + Expectancy_Efficiency) / 2
IF (WFO_Efficiency >= 0.55): // configurable 0.3-0.9
Strategy.Validated = TRUE
Strategy receives fitness bonus
ELSE:
Strategy receives 30% fitness penalty
ELSE:
Validation deferred (insufficient trades in one or both periods)
What Validation Means
Validated Strategy (Green "✓ VAL" in dashboard):
Performed at least 55% as well on unseen data compared to training data
Gets fitness bonus: +(efficiency - 0.5) × 0.1
Receives priority during tournament selection for breeding
More likely to be chosen as active trading strategy
Unvalidated Strategy (Orange "○ TRAIN" in dashboard):
Failed to maintain performance on test data (likely curve-fitted to training period)
Receives 30% fitness penalty (0.7x multiplier)
Makes strategy prime candidate for culling
Can still trade but with lower selection probability
Insufficient Data (continues collecting):
Hasn't completed both training and testing periods yet
OR hasn't achieved minimum trade count in both periods
Validation check deferred until requirements met
Why 55% Efficiency Threshold?
If a strategy earned 10R during training but only 5.5R during testing, it still proved an edge exists beyond random luck. Requiring 100% efficiency would be unrealistic - market conditions change between periods. But requiring >50% ensures the strategy didn't completely degrade on fresh data.
The Protection: Strategies that work great on historical data but fail on new data are automatically identified and penalized. This prevents the population from being polluted by overfitted strategies that would fail in live trading.
🌊 DYNAMIC VOLATILITY SCALING (DVS): ADAPTIVE STOP/TARGET PLACEMENT
AGE doesn't use fixed stop distances. It adapts to current volatility conditions in real-time.
Four Volatility Measurement Methods
1. ATR Ratio (Simple Method):
Current_Vol = ATR(14) / Close
Baseline_Vol = SMA(Current_Vol, 100)
Ratio = Current_Vol / Baseline_Vol
Basic comparison of current ATR to 100-bar moving average baseline.
2. Parkinson (High-Low Range Based):
For each bar: HL = log(High / Low)
Parkinson_Vol = sqrt(Σ(HL²) / (4 × Period × log(2)))
More stable than close-to-close volatility. Captures intraday range expansion without overnight gap noise.
3. Garman-Klass (OHLC Based):
HL_Term = 0.5 × ²
CO_Term = (2×log(2) - 1) × ²
GK_Vol = sqrt(Σ(HL_Term - CO_Term) / Period)
Most sophisticated estimator. Incorporates all four price points (open, high, low, close) plus gap information.
4. Ensemble Method (Default - Median of All Three):
Ratio_1 = ATR_Current / ATR_Baseline
Ratio_2 = Parkinson_Current / Parkinson_Baseline
Ratio_3 = GK_Current / GK_Baseline
DVS_Ratio = Median(Ratio_1, Ratio_2, Ratio_3)
Why Ensemble?
Takes median to avoid outliers and false spikes
If ATR jumps but range-based methods stay calm, median prevents overreaction
If one method fails, other two compensate
Most robust approach across different market conditions
Sensitivity Scaling
Scaled_Ratio = (Raw_Ratio) ^ Sensitivity
Sensitivity 0.3: Cube root - heavily dampens volatility impact
Sensitivity 0.5: Square root - moderate dampening
Sensitivity 0.7 (Default): Balanced response to volatility changes
Sensitivity 1.0: Linear - full 1:1 volatility impact
Sensitivity 1.5: Exponential - amplified response to volatility spikes
Safety Clamps: Final DVS Ratio always clamped between 0.5x and 2.5x baseline to prevent extreme position sizing or stop placement errors.
How DVS Affects Shadow Trading
Every strategy's stop and target distances are multiplied by the current DVS ratio:
Stop Loss Distance:
Stop_Distance = ATR × ATR_Mult (gene) × Stop_Mult (gene) × DVS_Ratio
Take Profit Distance:
Target_Distance = ATR × ATR_Mult (gene) × Target_Mult (gene) × DVS_Ratio
Example Scenario:
ATR = 10 points
Strategy's ATR_Mult gene = 2.5
Strategy's Stop_Mult gene = 1.5
Strategy's Target_Mult gene = 2.5
DVS_Ratio = 1.4 (40% above baseline volatility - market heating up)
Stop = 10 × 2.5 × 1.5 × 1.4 = 52.5 points (vs. 37.5 in normal vol)
Target = 10 × 2.5 × 2.5 × 1.4 = 87.5 points (vs. 62.5 in normal vol)
Result:
During volatility spikes: Stops automatically widen to avoid noise-based exits, targets extend for bigger moves
During calm periods: Stops tighten for better risk/reward, targets compress for realistic profit-taking
Strategies adapt risk management to match current market behavior
🧬 THE EVOLUTIONARY CYCLE: SPAWN, COMPETE, CULL
Initialization (Bar 1)
AGE begins with 4 seed strategies (if evolution enabled):
Seed Strategy #0 (Balanced):
All sensitivities at 1.0 (neutral)
Zero probability boost
Moderate trend requirement (0.4)
Standard ATR/stop/target multiples (2.5/1.5/2.5)
Mid-level regime adaptation (0.5)
Seed Strategy #1 (Momentum-Focused):
Lower entropy sensitivity (0.7), higher momentum (1.5)
Slight probability boost (+0.03)
Higher trend requirement (0.5)
Tighter stops (1.3), wider targets (3.0)
Seed Strategy #2 (Entropy-Driven):
Higher entropy sensitivity (1.5), lower momentum (0.8)
Slight probability penalty (-0.02)
More trend tolerant (0.6)
Wider stops (1.8), standard targets (2.5)
Seed Strategy #3 (Structure-Based):
Balanced entropy/momentum (0.8/0.9), high structure (1.4)
Slight probability boost (+0.02)
Lower trend requirement (0.35)
Moderate risk parameters (1.6/2.8)
All seeds start with WFO validation bypassed if WFO is disabled, or must validate if enabled.
Spawning New Strategies
Timing (Adaptive):
Historical phase: Every 30 bars (configurable 10-100)
Live phase: Every 200 bars (configurable 100-500)
Automatically switches to live timing when barstate.isrealtime triggers
Conditions:
Current population < max population limit (default: 8, configurable 4-12)
At least 2 active strategies exist (need parents)
Available slot in population array
Selection Process:
Run tournament selection 3 times with different seeds
Each tournament: randomly sample active strategies, pick highest fitness
Best from 3 tournaments becomes Parent 1
Repeat independently for Parent 2
Ensures fit parents but maintains diversity
Crossover Breeding:
For each of 10 genes:
Parent1_Fitness = fitness
Parent2_Fitness = fitness
Weight1 = Parent1_Fitness / (Parent1_Fitness + Parent2_Fitness)
Gene1 = parent1's value
Gene2 = parent2's value
Child_Gene = Weight1 × Gene1 + (1 - Weight1) × Gene2
Fitness-weighted crossover ensures fitter parent contributes more genetic material.
Mutation:
For each gene in child:
IF (random < mutation_rate):
Gene_Range = GENE_MAX - GENE_MIN
Noise = (random - 0.5) × 2 × mutation_strength × Gene_Range
Mutated_Gene = Clamp(Child_Gene + Noise, GENE_MIN, GENE_MAX)
Historical mutation rate: 20% (aggressive exploration)
Live mutation rate: 8% (conservative stability)
Mutation strength: 12% of gene range (configurable 5-25%)
Initialization of New Strategy:
Unique ID assigned (total_spawned counter)
Parent ID recorded
Generation = max(parent generations) + 1
Birth bar recorded (for age tracking)
All performance metrics zeroed
Shadow portfolio reset
WFO validation flag set to false (must prove itself)
Result: New strategy with hybrid DNA enters population, begins trading in next bar.
Competition (Every Bar)
All active strategies:
Calculate their signal based on unique DNA
Check quality gate with their thresholds
Manage shadow positions (entries/exits)
Update performance metrics
Recalculate fitness score
Track WFO validation progress
Strategies compete indirectly through fitness ranking - no direct interaction.
Culling Weak Strategies
Timing (Adaptive):
Historical phase: Every 60 bars (configurable 20-200, should be 2x spawn interval)
Live phase: Every 400 bars (configurable 200-1000, should be 2x spawn interval)
Minimum Adaptation Score (MAS):
Initial MAS = 0.10
MAS decays: MAS × 0.995 every cull cycle
Minimum MAS = 0.03 (floor)
MAS represents the "survival threshold" - strategies below this fitness level are vulnerable.
Culling Conditions (ALL must be true):
Population > minimum population (default: 3, configurable 2-4)
At least one strategy has fitness < MAS
Strategy's age > culling interval (prevents premature culling of new strategies)
Strategy is not in top N elite (default: 2, configurable 1-3)
Culling Process:
Find worst strategy:
For each active strategy:
IF (age > cull_interval):
Fitness = base_fitness
IF (not WFO_validated AND WFO_enabled):
Fitness × 0.7 // 30% penalty for unvalidated
IF (Fitness < MAS AND Fitness < worst_fitness_found):
worst_strategy = this_strategy
worst_fitness = Fitness
IF (worst_strategy found):
Count elite strategies with fitness > worst_fitness
IF (elite_count >= elite_preservation_count):
Deactivate worst_strategy (set active flag = false)
Increment total_culled counter
Elite Protection:
Even if a strategy's fitness falls below MAS, it survives if fewer than N strategies are better. This prevents culling when population is generally weak.
Result: Weak strategies removed from population, freeing slots for new spawns. Gene pool improves over time.
Selection for Display (Every Bar)
AGE chooses one strategy to display signals:
Best fitness = -1
Selected = none
For each active strategy:
Fitness = base_fitness
IF (WFO_validated):
Fitness × 1.3 // 30% bonus for validated strategies
IF (Fitness > best_fitness):
best_fitness = Fitness
selected_strategy = this_strategy
Display selected strategy's signals on chart
Result: Only the highest-fitness (optionally validated-boosted) strategy's signals appear as chart markers. Other strategies trade invisibly in shadow portfolios.
🎨 PREMIUM VISUALIZATION SYSTEM
AGE includes sophisticated visual feedback that standard indicators lack:
1. Gradient Probability Cloud (Optional, Default: ON)
Multi-layer gradient showing signal buildup 2-3 bars before entry:
Activation Conditions:
Signal persistence > 0 (same directional signal held for multiple bars)
Signal probability ≥ minimum threshold (65% by default)
Signal hasn't yet executed (still in "forming" state)
Visual Construction:
7 gradient layers by default (configurable 3-15)
Each layer is a line-fill pair (top line, bottom line, filled between)
Layer spacing: 0.3 to 1.0 × ATR above/below price
Outer layers = faint, inner layers = bright
Color transitions from base to intense based on layer position
Transparency scales with probability (high prob = more opaque)
Color Selection:
Long signals: Gradient from theme.gradient_bull_mid to theme.gradient_bull_strong
Short signals: Gradient from theme.gradient_bear_mid to theme.gradient_bear_strong
Base transparency: 92%, reduces by up to 8% for high-probability setups
Dynamic Behavior:
Cloud grows/shrinks as signal persistence increases/decreases
Redraws every bar while signal is forming
Disappears when signal executes or invalidates
Performance Note: Computationally expensive due to linefill objects. Disable or reduce layers if chart performance degrades.
2. Population Fitness Ribbon (Optional, Default: ON)
Histogram showing fitness distribution across active strategies:
Activation: Only draws on last bar (barstate.islast) to avoid historical clutter
Visual Construction:
10 histogram layers by default (configurable 5-20)
Plots 50 bars back from current bar
Positioned below price at: lowest_low(100) - 1.5×ATR (doesn't interfere with price action)
Each layer represents a fitness threshold (evenly spaced min to max fitness)
Layer Logic:
For layer_num from 0 to ribbon_layers:
Fitness_threshold = min_fitness + (max_fitness - min_fitness) × (layer / layers)
Count strategies with fitness ≥ threshold
Height = ATR × 0.15 × (count / total_active)
Y_position = base_level + ATR × 0.2 × layer
Color = Gradient from weak to strong based on layer position
Line_width = Scaled by height (taller = thicker)
Visual Feedback:
Tall, bright ribbon = healthy population, many fit strategies at high fitness levels
Short, dim ribbon = weak population, few strategies achieving good fitness
Ribbon compression (layers close together) = population converging to similar fitness
Ribbon spread = diverse fitness range, active selection pressure
Use Case: Quick visual health check without opening dashboard. Ribbon growing upward over time = population improving.
3. Confidence Halo (Optional, Default: ON)
Circular polyline around entry signals showing probability strength:
Activation: Draws when new position opens (shadow_position changes from 0 to ±1)
Visual Construction:
20-segment polyline forming approximate circle
Center: Low - 0.5×ATR (long) or High + 0.5×ATR (short)
Radius: 0.3×ATR (low confidence) to 1.0×ATR (elite confidence)
Scales with: (probability - min_probability) / (1.0 - min_probability)
Color Coding:
Elite (85%+): Cyan (theme.conf_elite), large radius, minimal transparency (40%)
Strong (75-85%): Strong green (theme.conf_strong), medium radius, moderate transparency (50%)
Good (65-75%): Good green (theme.conf_good), smaller radius, more transparent (60%)
Moderate (<65%): Moderate green (theme.conf_moderate), tiny radius, very transparent (70%)
Technical Detail:
Uses chart.point array with index-based positioning
5-bar horizontal spread for circular appearance (±5 bars from entry)
Curved=false (Pine Script polyline limitation)
Fill color matches line color but more transparent (88% vs line's transparency)
Purpose: Instant visual probability assessment. No need to check dashboard - halo size/brightness tells the story.
4. Evolution Event Markers (Optional, Default: ON)
Visual indicators of genetic algorithm activity:
Spawn Markers (Diamond, Cyan):
Plots when total_spawned increases on current bar
Location: bottom of chart (location.bottom)
Color: theme.spawn_marker (cyan/bright blue)
Size: tiny
Indicates new strategy just entered population
Cull Markers (X-Cross, Red):
Plots when total_culled increases on current bar
Location: bottom of chart (location.bottom)
Color: theme.cull_marker (red/pink)
Size: tiny
Indicates weak strategy just removed from population
What It Tells You:
Frequent spawning early = population building, active exploration
Frequent culling early = high selection pressure, weak strategies dying fast
Balanced spawn/cull = healthy evolutionary churn
No markers for long periods = stable population (evolution plateaued or optimal genes found)
5. Entry/Exit Markers
Clear visual signals for selected strategy's trades:
Long Entry (Triangle Up, Green):
Plots when selected strategy opens long position (position changes 0 → +1)
Location: below bar (location.belowbar)
Color: theme.long_primary (green/cyan depending on theme)
Transparency: Scales with probability:
Elite (85%+): 0% (fully opaque)
Strong (75-85%): 10%
Good (65-75%): 20%
Acceptable (55-65%): 35%
Size: small
Short Entry (Triangle Down, Red):
Plots when selected strategy opens short position (position changes 0 → -1)
Location: above bar (location.abovebar)
Color: theme.short_primary (red/pink depending on theme)
Transparency: Same scaling as long entries
Size: small
Exit (X-Cross, Orange):
Plots when selected strategy closes position (position changes ±1 → 0)
Location: absolute (at actual exit price if stop/target lines enabled)
Color: theme.exit_color (orange/yellow depending on theme)
Transparency: 0% (fully opaque)
Size: tiny
Result: Clean, probability-scaled markers that don't clutter chart but convey essential information.
6. Stop Loss & Take Profit Lines (Optional, Default: ON)
Visual representation of shadow portfolio risk levels:
Stop Loss Line:
Plots when selected strategy has active position
Level: shadow_stop value from selected strategy
Color: theme.short_primary with 60% transparency (red/pink, subtle)
Width: 2
Style: plot.style_linebr (breaks when no position)
Take Profit Line:
Plots when selected strategy has active position
Level: shadow_target value from selected strategy
Color: theme.long_primary with 60% transparency (green, subtle)
Width: 2
Style: plot.style_linebr (breaks when no position)
Purpose:
Shows where shadow portfolio would exit for stop/target
Helps visualize strategy's risk/reward ratio
Useful for manual traders to set similar levels
Disable for cleaner chart (recommended for presentations)
7. Dynamic Trend EMA
Gradient-colored trend line that visualizes trend strength:
Calculation:
EMA(close, trend_length) - default 50 period (configurable 20-100)
Slope calculated over 10 bars: (current_ema - ema ) / ema × 100
Color Logic:
Trend_direction:
Slope > 0.1% = Bullish (1)
Slope < -0.1% = Bearish (-1)
Otherwise = Neutral (0)
Trend_strength = abs(slope)
Color = Gradient between:
- Neutral color (gray/purple)
- Strong bullish (bright green) if direction = 1
- Strong bearish (bright red) if direction = -1
Gradient factor = trend_strength (0 to 1+ scale)
Visual Behavior:
Faint gray/purple = weak/no trend (choppy conditions)
Light green/red = emerging trend (low strength)
Bright green/red = strong trend (high conviction)
Color intensity = trend strength magnitude
Transparency: 50% (subtle, doesn't overpower price action)
Purpose: Subconscious awareness of trend state without checking dashboard or indicators.
8. Regime Background Tinting (Subtle)
Ultra-low opacity background color indicating detected market regime:
Regime Detection:
Efficiency = directional_movement / total_range (over trend_length bars)
Vol_ratio = current_volatility / average_volatility
IF (efficiency > 0.5 AND vol_ratio < 1.3):
Regime = Trending (1)
ELSE IF (vol_ratio > 1.5):
Regime = Volatile (2)
ELSE:
Regime = Choppy (0)
Background Colors:
Trending: theme.regime_trending (dark green, 92-93% transparency)
Volatile: theme.regime_volatile (dark red, 93% transparency)
Choppy: No tint (normal background)
Purpose:
Subliminal regime awareness
Helps explain why signals are/aren't generating
Trending = ideal conditions for AGE
Volatile = fewer signals, higher thresholds applied
Choppy = mixed signals, lower confidence
Important: Extremely subtle by design. Not meant to be obvious, just subconscious context.
📊 ENHANCED DASHBOARD
Comprehensive real-time metrics in single organized panel (top-right position):
Dashboard Structure (5 columns × 14 rows)
Header Row:
Column 0: "🧬 AGE PRO" + phase indicator (🔴 LIVE or ⏪ HIST)
Column 1: "POPULATION"
Column 2: "PERFORMANCE"
Column 3: "CURRENT SIGNAL"
Column 4: "ACTIVE STRATEGY"
Column 0: Market State
Regime (📈 TREND / 🌊 CHAOS / ➖ CHOP)
DVS Ratio (current volatility scaling factor, format: #.##)
Trend Direction (▲ BULL / ▼ BEAR / ➖ FLAT with color coding)
Trend Strength (0-100 scale, format: #.##)
Column 1: Population Metrics
Active strategies (count / max_population)
Validated strategies (WFO passed / active total)
Current generation number
Total spawned (all-time strategy births)
Total culled (all-time strategy deaths)
Column 2: Aggregate Performance
Total trades across all active strategies
Aggregate win rate (%) - color-coded:
Green (>55%)
Orange (45-55%)
Red (<45%)
Total P&L in R-multiples - color-coded by positive/negative
Best fitness score in population (format: #.###)
MAS - Minimum Adaptation Score (cull threshold, format: #.###)
Column 3: Current Signal Status
Status indicator:
"▲ LONG" (green) if selected strategy in long position
"▼ SHORT" (red) if selected strategy in short position
"⏳ FORMING" (orange) if signal persisting but not yet executed
"○ WAITING" (gray) if no active signal
Confidence percentage (0-100%, format: #.#%)
Quality assessment:
"🔥 ELITE" (cyan) for 85%+ probability
"✓ STRONG" (bright green) for 75-85%
"○ GOOD" (green) for 65-75%
"- LOW" (dim) for <65%
Confluence score (X/3 format)
Signal age:
"X bars" if signal forming
"IN TRADE" if position active
"---" if no signal
Column 4: Selected Strategy Details
Strategy ID number (#X format)
Validation status:
"✓ VAL" (green) if WFO validated
"○ TRAIN" (orange) if still in training/testing phase
Generation number (GX format)
Personal fitness score (format: #.### with color coding)
Trade count
P&L and win rate (format: #.#R (##%) with color coding)
Color Scheme:
Panel background: theme.panel_bg (dark, low opacity)
Panel headers: theme.panel_header (slightly lighter)
Primary text: theme.text_primary (bright, high contrast)
Secondary text: theme.text_secondary (dim, lower contrast)
Positive metrics: theme.metric_positive (green)
Warning metrics: theme.metric_warning (orange)
Negative metrics: theme.metric_negative (red)
Special markers: theme.validated_marker, theme.spawn_marker
Update Frequency: Only on barstate.islast (current bar) to minimize CPU usage
Purpose:
Quick overview of entire system state
No need to check multiple indicators
Trading decisions informed by population health, regime state, and signal quality
Transparency into what AGE is thinking
🔍 DIAGNOSTICS PANEL (Optional, Default: OFF)
Detailed signal quality tracking for optimization and debugging:
Panel Structure (3 columns × 8 rows)
Position: Bottom-right corner (doesn't interfere with main dashboard)
Header Row:
Column 0: "🔍 DIAGNOSTICS"
Column 1: "COUNT"
Column 2: "%"
Metrics Tracked (for selected strategy only):
Total Evaluated:
Every signal that passed initial calculation (direction ≠ 0)
Represents total opportunities considered
✓ Passed:
Signals that passed quality gate and executed
Green color coding
Percentage of evaluated signals
Rejection Breakdown:
⨯ Probability:
Rejected because probability < minimum threshold
Most common rejection reason typically
⨯ Confluence:
Rejected because confluence < minimum required (e.g., only 1 of 3 indicators agreed)
⨯ Trend:
Rejected because signal opposed strong trend
Indicates counter-trend protection working
⨯ Regime:
Rejected because volatile regime detected and probability wasn't high enough to override
Shows regime filter in action
⨯ Volume:
Rejected because volume < 70% of 20-bar average
Indicates volume confirmation requirement
Color Coding:
Passed count: Green (success metric)
Rejection counts: Red (failure metrics)
Percentages: Gray (neutral, informational)
Performance Cost: Slight CPU overhead for tracking counters. Disable when not actively optimizing settings.
How to Use Diagnostics
Scenario 1: Too Few Signals
Evaluated: 200
Passed: 10 (5%)
⨯ Probability: 120 (60%)
⨯ Confluence: 40 (20%)
⨯ Others: 30 (15%)
Diagnosis: Probability threshold too high for this strategy's DNA.
Solution: Lower min probability from 65% to 60%, or allow strategy more time to evolve better DNA.
Scenario 2: Too Many False Signals
Evaluated: 200
Passed: 80 (40%)
Strategy win rate: 45%
Diagnosis: Quality gate too loose, letting low-quality signals through.
Solution: Raise min probability to 70%, or increase min confluence to 3 (all indicators must agree).
Scenario 3: Regime-Specific Issues
⨯ Regime: 90 (45% of rejections)
Diagnosis: Frequent volatile regime detection blocking otherwise good signals.
Solution: Either accept fewer trades during chaos (recommended), or disable regime filter if you want signals regardless of market state.
Optimization Workflow:
Enable diagnostics
Run 200+ bars
Analyze rejection patterns
Adjust settings based on data
Re-run and compare pass rate
Disable diagnostics when satisfied
⚙️ CONFIGURATION GUIDE
🧬 Evolution Engine Settings
Enable AGE Evolution (Default: ON):
ON: Full genetic algorithm (recommended for best results)
OFF: Uses only 4 seed strategies, no spawning/culling (static population for comparison testing)
Max Population (4-12, Default: 8):
Higher = more diversity, more exploration, slower performance
Lower = faster computation, less exploration, risk of premature convergence
Sweet spot: 6-8 for most use cases
4 = minimum for meaningful evolution
12 = maximum before diminishing returns
Min Population (2-4, Default: 3):
Safety floor - system never culls below this count
Prevents population extinction during harsh selection
Should be at least half of max population
Elite Preservation (1-3, Default: 2):
Top N performers completely immune to culling
Ensures best genes always survive
1 = minimal protection, aggressive selection
2 = balanced (recommended)
3 = conservative, slower gene pool turnover
Historical: Spawn Interval (10-100, Default: 30):
Bars between spawning new strategies during historical data
Lower = faster evolution, more exploration
Higher = slower evolution, more evaluation time per strategy
30 bars = ~1-2 hours on 15min chart
Historical: Cull Interval (20-200, Default: 60):
Bars between culling weak strategies during historical data
Should be 2x spawn interval for balanced churn
Lower = aggressive selection pressure
Higher = patient evaluation
Live: Spawn Interval (100-500, Default: 200):
Bars between spawning during live trading
Much slower than historical for stability
Prevents population chaos during live trading
200 bars = ~1.5 trading days on 15min chart
Live: Cull Interval (200-1000, Default: 400):
Bars between culling during live trading
Should be 2x live spawn interval
Conservative removal during live trading
Historical: Mutation Rate (0.05-0.40, Default: 0.20):
Probability each gene mutates during breeding (20% = 2 out of 10 genes on average)
Higher = more exploration, slower convergence
Lower = more exploitation, faster convergence but risk of local optima
20% balances exploration vs exploitation
Live: Mutation Rate (0.02-0.20, Default: 0.08):
Mutation rate during live trading
Much lower for stability (don't want population to suddenly degrade)
8% = mostly inherits parent genes with small tweaks
Mutation Strength (0.05-0.25, Default: 0.12):
How much genes change when mutated (% of gene's total range)
0.05 = tiny nudges (fine-tuning)
0.12 = moderate jumps (recommended)
0.25 = large leaps (aggressive exploration)
Example: If gene range is 0.5-2.0, 12% strength = ±0.18 possible change
📈 Signal Quality Settings
Min Signal Probability (0.55-0.80, Default: 0.65):
Quality gate threshold - signals below this never generate
0.55-0.60 = More signals, accept lower confidence (higher risk)
0.65 = Institutional-grade balance (recommended)
0.70-0.75 = Fewer but higher-quality signals (conservative)
0.80+ = Very selective, very few signals (ultra-conservative)
Min Confluence Score (1-3, Default: 2):
Required indicator agreement before signal generates
1 = Any single indicator can trigger (not recommended - too many false signals)
2 = Requires 2 of 3 indicators agree (RECOMMENDED for balance)
3 = All 3 must agree (very selective, few signals, high quality)
Base Persistence Bars (1-5, Default: 2):
Base bars signal must persist before entry
System adapts automatically:
High probability signals (75%+) enter 1 bar faster
Low probability signals (<68%) need 1 bar more
Trending regime: -1 bar (faster entries)
Volatile regime: +1 bar (more confirmation)
1 = Immediate entry after quality gate (responsive but prone to whipsaw)
2 = Balanced confirmation (recommended)
3-5 = Patient confirmation (slower but more reliable)
Cooldown After Trade (3-20, Default: 8):
Bars to wait after exit before next entry allowed
Prevents overtrading and revenge trading
3 = Minimal cooldown (active trading)
8 = Balanced (recommended)
15-20 = Conservative (position trading)
Entropy Length (10-50, Default: 20):
Lookback period for market order/disorder calculation
Lower = more responsive to regime changes (noisy)
Higher = more stable regime detection (laggy)
20 = works across most timeframes
Momentum Length (5-30, Default: 14):
Period for RSI/ROC calculations
14 = standard (RSI default)
Lower = more signals, less reliable
Higher = fewer signals, more reliable
Structure Length (20-100, Default: 50):
Lookback for support/resistance swing range
20 = short-term swings (day trading)
50 = medium-term structure (recommended)
100 = major structure (position trading)
Trend EMA Length (20-100, Default: 50):
EMA period for trend detection and direction bias
20 = short-term trend (responsive)
50 = medium-term trend (recommended)
100 = long-term trend (position trading)
ATR Period (5-30, Default: 14):
Period for volatility measurement
14 = standard ATR
Lower = more responsive to vol changes
Higher = smoother vol calculation
📊 Volatility Scaling (DVS) Settings
Enable DVS (Default: ON):
Dynamic volatility scaling for adaptive stop/target placement
Highly recommended to leave ON
OFF only for testing fixed-distance stops
DVS Method (Default: Ensemble):
ATR Ratio: Simple, fast, single-method (good for beginners)
Parkinson: High-low range based (good for intraday)
Garman-Klass: OHLC based (sophisticated, considers gaps)
Ensemble: Median of all three (RECOMMENDED - most robust)
DVS Memory (20-200, Default: 100):
Lookback for baseline volatility comparison
20 = very responsive to vol changes (can overreact)
100 = balanced adaptation (recommended)
200 = slow, stable baseline (minimizes false vol signals)
DVS Sensitivity (0.3-1.5, Default: 0.7):
How much volatility affects scaling (power-law exponent)
0.3 = Conservative, heavily dampens vol impact (cube root)
0.5 = Moderate dampening (square root)
0.7 = Balanced response (recommended)
1.0 = Linear, full 1:1 vol response
1.5 = Aggressive, amplified response (exponential)
🔬 Walk-Forward Optimization Settings
Enable WFO (Default: ON):
Out-of-sample validation to prevent overfitting
Highly recommended to leave ON
OFF only for testing or if you want unvalidated strategies
Training Window (100-500, Default: 250):
Bars for in-sample optimization
100 = fast validation, less data (risky)
250 = balanced (recommended) - about 1-2 months on daily, 1-2 weeks on 15min
500 = patient validation, more data (conservative)
Testing Window (30-200, Default: 75):
Bars for out-of-sample validation
Should be ~30% of training window
30 = minimal test (fast validation)
75 = balanced (recommended)
200 = extensive test (very conservative)
Min Trades for Validation (3-15, Default: 5):
Required trades in BOTH training AND testing periods
3 = minimal sample (risky, fast validation)
5 = balanced (recommended)
10+ = conservative (slow validation, high confidence)
WFO Efficiency Threshold (0.3-0.9, Default: 0.55):
Minimum test/train performance ratio required
0.30 = Very loose (test must be 30% as good as training)
0.55 = Balanced (recommended) - test must be 55% as good
0.70+ = Strict (test must closely match training)
Higher = fewer validated strategies, lower risk of overfitting
🎨 Premium Visuals Settings
Visual Theme:
Neon Genesis: Cyberpunk aesthetic (cyan/magenta/purple)
Carbon Fiber: Industrial look (blue/red/gray)
Quantum Blue: Quantum computing (blue/purple/pink)
Aurora: Northern lights (teal/orange/purple)
⚡ Gradient Probability Cloud (Default: ON):
Multi-layer gradient showing signal buildup
Turn OFF if chart lags or for cleaner look
Cloud Gradient Layers (3-15, Default: 7):
More layers = smoother gradient, more CPU intensive
Fewer layers = faster, blockier appearance
🎗️ Population Fitness Ribbon (Default: ON):
Histogram showing fitness distribution
Turn OFF for cleaner chart
Ribbon Layers (5-20, Default: 10):
More layers = finer fitness detail
Fewer layers = simpler histogram
⭕ Signal Confidence Halo (Default: ON):
Circular indicator around entry signals
Size/brightness scales with probability
Minimal performance cost
🔬 Evolution Event Markers (Default: ON):
Diamond (spawn) and X (cull) markers
Shows genetic algorithm activity
Minimal performance cost
🎯 Stop/Target Lines (Default: ON):
Shows shadow portfolio stop/target levels
Turn OFF for cleaner chart (recommended for screenshots/presentations)
📊 Enhanced Dashboard (Default: ON):
Comprehensive metrics panel
Should stay ON unless you want zero overlays
🔍 Diagnostics Panel (Default: OFF):
Detailed signal rejection tracking
Turn ON when optimizing settings
Turn OFF during normal use (slight performance cost)
📈 USAGE WORKFLOW - HOW TO USE THIS INDICATOR
Phase 1: Initial Setup & Learning
Add AGE to your chart
Recommended timeframes: 15min, 30min, 1H (best signal-to-noise ratio)
Works on: 5min (day trading), 4H (swing trading), Daily (position trading)
Load 1000+ bars for sufficient evolution history
Let the population evolve (100+ bars minimum)
First 50 bars: Random exploration, poor results expected
Bars 50-150: Population converging, fitness improving
Bars 150+: Stable performance, validated strategies emerging
Watch the dashboard metrics
Population should grow toward max capacity
Generation number should advance regularly
Validated strategies counter should increase
Best fitness should trend upward toward 0.50-0.70 range
Observe evolution markers
Diamond markers (cyan) = new strategies spawning
X markers (red) = weak strategies being culled
Frequent early activity = healthy evolution
Activity slowing = population stabilizing
Be patient. Evolution takes time. Don't judge performance before 150+ bars.
Phase 2: Signal Observation
Watch signals form
Gradient cloud builds up 2-3 bars before entry
Cloud brightness = probability strength
Cloud thickness = signal persistence
Check signal quality
Look at confidence halo size when entry marker appears
Large bright halo = elite setup (85%+)
Medium halo = strong setup (75-85%)
Small halo = good setup (65-75%)
Verify market conditions
Check trend EMA color (green = uptrend, red = downtrend, gray = choppy)
Check background tint (green = trending, red = volatile, clear = choppy)
Trending background + aligned signal = ideal conditions
Review dashboard signal status
Current Signal column shows:
Status (Long/Short/Forming/Waiting)
Confidence % (actual probability value)
Quality assessment (Elite/Strong/Good)
Confluence score (2/3 or 3/3 preferred)
Only signals meeting ALL quality gates appear on chart. If you're not seeing signals, population is either still learning or market conditions aren't suitable.
Phase 3: Manual Trading Execution
When Long Signal Fires:
Verify confidence level (dashboard or halo size)
Confirm trend alignment (EMA sloping up, green color)
Check regime (preferably trending or choppy, avoid volatile)
Enter long manually on your broker platform
Set stop loss at displayed stop line level (if lines enabled), or use your own risk management
Set take profit at displayed target line level, or trail manually
Monitor position - exit if X marker appears (signal reversal)
When Short Signal Fires:
Same verification process
Confirm downtrend (EMA sloping down, red color)
Enter short manually
Use displayed stop/target levels or your own
AGE tells you WHEN and HOW CONFIDENT. You decide WHETHER and HOW MUCH.
Phase 4: Set Up Alerts (Never Miss a Signal)
Right-click on indicator name in legend
Select "Add Alert"
Choose condition:
"AGE Long" = Long entry signal fired
"AGE Short" = Short entry signal fired
"AGE Exit" = Position reversal/exit signal
Set notification method:
Sound alert (popup on chart)
Email notification
Webhook to phone/trading platform
Mobile app push notification
Name the alert (e.g., "AGE BTCUSD 15min Long")
Save alert
Recommended: Set alerts for both long and short, enable mobile push notifications. You'll get alerted in real-time even if not watching charts.
Phase 5: Monitor Population Health
Weekly Review:
Check dashboard Population column:
Active count should be near max (6-8 of 8)
Validated count should be >50% of active
Generation should be advancing (1-2 per week typical)
Check dashboard Performance column:
Aggregate win rate should be >50% (target: 55-65%)
Total P&L should be positive (may fluctuate)
Best fitness should be >0.50 (target: 0.55-0.70)
MAS should be declining slowly (normal adaptation)
Check Active Strategy column:
Selected strategy should be validated (✓ VAL)
Personal fitness should match best fitness
Trade count should be accumulating
Win rate should be >50%
Warning Signs:
Zero validated strategies after 300+ bars = settings too strict or market unsuitable
Best fitness stuck <0.30 = population struggling, consider parameter adjustment
No spawning/culling for 200+ bars = evolution stalled (may be optimal or need reset)
Aggregate win rate <45% sustained = system not working on this instrument/timeframe
Health Check Pass:
50%+ strategies validated
Best fitness >0.50
Aggregate win rate >52%
Regular spawn/cull activity
Selected strategy validated
Phase 6: Optimization (If Needed)
Enable Diagnostics Panel (bottom-right) for data-driven tuning:
Problem: Too Few Signals
Evaluated: 200
Passed: 8 (4%)
⨯ Probability: 140 (70%)
Solutions:
Lower min probability: 65% → 60% or 55%
Reduce min confluence: 2 → 1
Lower base persistence: 2 → 1
Increase mutation rate temporarily to explore new genes
Check if regime filter is blocking signals (⨯ Regime high?)
Problem: Too Many False Signals
Evaluated: 200
Passed: 90 (45%)
Win rate: 42%
Solutions:
Raise min probability: 65% → 70% or 75%
Increase min confluence: 2 → 3
Raise base persistence: 2 → 3
Enable WFO if disabled (validates strategies before use)
Check if volume filter is being ignored (⨯ Volume low?)
Problem: Counter-Trend Losses
⨯ Trend: 5 (only 5% rejected)
Losses often occur against trend
Solutions:
System should already filter trend opposition
May need stronger trend requirement
Consider only taking signals aligned with higher timeframe trend
Use longer trend EMA (50 → 100)
Problem: Volatile Market Whipsaws
⨯ Regime: 100 (50% rejected by volatile regime)
Still getting stopped out frequently
Solutions:
System is correctly blocking volatile signals
Losses happening because vol filter isn't strict enough
Consider not trading during volatile periods (respect the regime)
Or disable regime filter and accept higher risk
Optimization Workflow:
Enable diagnostics
Run 200+ bars with current settings
Analyze rejection patterns and win rate
Make ONE change at a time (scientific method)
Re-run 200+ bars and compare results
Keep change if improvement, revert if worse
Disable diagnostics when satisfied
Never change multiple parameters at once - you won't know what worked.
Phase 7: Multi-Instrument Deployment
AGE learns independently on each chart:
Recommended Strategy:
Deploy AGE on 3-5 different instruments
Different asset classes ideal (e.g., ES futures, EURUSD, BTCUSD, SPY, Gold)
Each learns optimal strategies for that instrument's personality
Take signals from all 5 charts
Natural diversification reduces overall risk
Why This Works:
When one market is choppy, others may be trending
Different instruments respond to different news/catalysts
Portfolio-level win rate more stable than single-instrument
Evolution explores different parameter spaces on each chart
Setup:
Same settings across all charts (or customize if preferred)
Set alerts for all
Take every validated signal across all instruments
Position size based on total account (don't overleverage any single signal)
⚠️ REALISTIC EXPECTATIONS - CRITICAL READING
What AGE Can Do
✅ Generate probability-weighted signals using genetic algorithms
✅ Evolve strategies in real-time through natural selection
✅ Validate strategies on out-of-sample data (walk-forward optimization)
✅ Adapt to changing market conditions automatically over time
✅ Provide comprehensive metrics on population health and signal quality
✅ Work on any instrument, any timeframe, any broker
✅ Improve over time as weak strategies are culled and fit strategies breed
What AGE Cannot Do
❌ Win every trade (typical win rate: 55-65% at best)
❌ Predict the future with certainty (markets are probabilistic, not deterministic)
❌ Work perfectly from bar 1 (needs 100-150 bars to learn and stabilize)
❌ Guarantee profits under all market conditions
❌ Replace your trading discipline and risk management
❌ Execute trades automatically (this is an indicator, not a strategy)
❌ Prevent all losses (drawdowns are normal and expected)
❌ Adapt instantly to regime changes (re-learning takes 50-100 bars)
Performance Realities
Typical Performance After Evolution Stabilizes (150+ bars):
Win Rate: 55-65% (excellent for trend-following systems)
Profit Factor: 1.5-2.5 (realistic for validated strategies)
Signal Frequency: 5-15 signals per 100 bars (quality over quantity)
Drawdown Periods: 20-40% of time in equity retracement (normal trading reality)
Max Consecutive Losses: 5-8 losses possible even with 60% win rate (probability says this is normal)
Evolution Timeline:
Bars 0-50: Random exploration, learning phase - poor results expected, don't judge yet
Bars 50-150: Population converging, fitness climbing - results improving
Bars 150-300: Stable performance, most strategies validated - consistent results
Bars 300+: Mature population, optimal genes dominant - best results
Market Condition Dependency:
Trending Markets: AGE excels - clear directional moves, high-probability setups
Choppy Markets: AGE struggles - fewer signals generated, lower win rate
Volatile Markets: AGE cautious - higher rejection rate, wider stops, fewer trades
Market Regime Changes:
When market shifts from trending to choppy overnight
Validated strategies can become temporarily invalidated
AGE will adapt through evolution, but not instantly
Expect 50-100 bar re-learning period after major regime shifts
Fitness may temporarily drop then recover
This is NOT a holy grail. It's a sophisticated signal generator that learns and adapts using genetic algorithms. Your success depends on:
Patience during learning periods (don't abandon after 3 losses)
Proper position sizing (risk 0.5-2% per trade, not 10%)
Following signals consistently (cherry-picking defeats statistical edge)
Not abandoning system prematurely (give it 200+ bars minimum)
Understanding probability (60% win rate means 40% of trades WILL lose)
Respecting market conditions (trending = trade more, choppy = trade less)
Managing emotions (AGE is emotionless, you need to be too)
Expected Drawdowns:
Single-strategy max DD: 10-20% of equity (normal)
Portfolio across multiple instruments: 5-15% (diversification helps)
Losing streaks: 3-5 consecutive losses expected periodically
No indicator eliminates risk. AGE manages risk through:
Quality gates (rejecting low-probability signals)
Confluence requirements (multi-indicator confirmation)
Persistence requirements (no knee-jerk reactions)
Regime awareness (reduced trading in chaos)
Walk-forward validation (preventing overfitting)
But it cannot prevent all losses. That's inherent to trading.
🔧 TECHNICAL SPECIFICATIONS
Platform: TradingView Pine Script v5
Indicator Type: Overlay indicator (plots on price chart)
Execution Type: Signals only - no automatic order placement
Computational Load:
Moderate to High (genetic algorithms + shadow portfolios)
8 strategies × shadow portfolio simulation = significant computation
Premium visuals add additional load (gradient cloud, fitness ribbon)
TradingView Resource Limits (Built-in Caps):
Max Bars Back: 500 (sufficient for WFO and evolution)
Max Labels: 100 (plenty for entry/exit markers)
Max Lines: 150 (adequate for stop/target lines)
Max Boxes: 50 (not heavily used)
Max Polylines: 100 (confidence halos)
Recommended Chart Settings:
Timeframe: 15min to 1H (optimal signal/noise balance)
5min: Works but noisier, more signals
4H/Daily: Works but fewer signals
Bars Loaded: 1000+ (ensures sufficient evolution history)
Replay Mode: Excellent for testing without risk
Performance Optimization Tips:
Disable gradient cloud if chart lags (most CPU intensive visual)
Disable fitness ribbon if still laggy
Reduce cloud layers from 7 to 3
Reduce ribbon layers from 10 to 5
Turn off diagnostics panel unless actively tuning
Close other heavy indicators to free resources
Browser/Platform Compatibility:
Works on all modern browsers (Chrome, Firefox, Safari, Edge)
Mobile app supported (full functionality on phone/tablet)
Desktop app supported (best performance)
Web version supported (may be slower on older computers)
Data Requirements:
Real-time or delayed data both work
No special data feeds required
Works with TradingView's standard data
Historical + live data seamlessly integrated
🎓 THEORETICAL FOUNDATIONS
AGE synthesizes advanced concepts from multiple disciplines:
Evolutionary Computation
Genetic Algorithms (Holland, 1975): Population-based optimization through natural selection metaphor
Tournament Selection: Fitness-based parent selection with diversity preservation
Crossover Operators: Fitness-weighted gene recombination from two parents
Mutation Operators: Random gene perturbation for exploration of new parameter space
Elitism: Preservation of top N performers to prevent loss of best solutions
Adaptive Parameters: Different mutation rates for historical vs. live phases
Technical Analysis
Support/Resistance: Price structure within swing ranges
Trend Following: EMA-based directional bias
Momentum Analysis: RSI, ROC, MACD composite indicators
Volatility Analysis: ATR-based risk scaling
Volume Confirmation: Trade activity validation
Information Theory
Shannon Entropy (1948): Quantification of market order vs. disorder
Signal-to-Noise Ratio: Directional information vs. random walk
Information Content: How much "information" a price move contains
Statistics & Probability
Walk-Forward Analysis: Rolling in-sample/out-of-sample optimization
Out-of-Sample Validation: Testing on unseen data to prevent overfitting
Monte Carlo Principles: Shadow portfolio simulation with realistic execution
Expectancy Theory: Win rate × avg win - loss rate × avg loss
Probability Distributions: Signal confidence quantification
Risk Management
ATR-Based Stops: Volatility-normalized risk per trade
Volatility Regime Detection: Market state classification (trending/choppy/volatile)
Drawdown Control: Peak-to-trough equity measurement
R-Multiple Normalization: Performance measurement in risk units
Machine Learning Concepts
Online Learning: Continuous adaptation as new data arrives
Fitness Functions: Multi-objective optimization (win rate + expectancy + drawdown)
Exploration vs. Exploitation: Balance between trying new strategies and using proven ones
Overfitting Prevention: Walk-forward validation as regularization
Novel Contribution:
AGE is the first TradingView indicator to apply genetic algorithms to real-time indicator parameter optimization while maintaining strict anti-overfitting controls through walk-forward validation.
Most "adaptive" indicators simply recalibrate lookback periods or thresholds. AGE evolves entirely new strategies through competitive selection - it's not parameter tuning, it's Darwinian evolution of trading logic itself.
The combination of:
Genetic algorithm population management
Shadow portfolio simulation for realistic fitness evaluation
Walk-forward validation to prevent overfitting
Multi-indicator confluence for signal quality
Dynamic volatility scaling for adaptive risk
...creates a system that genuinely learns and improves over time while avoiding the curse of curve-fitting that plagues most optimization approaches.
🏗️ DEVELOPMENT NOTES
This project represents months of intensive development, facing significant technical challenges:
Challenge 1: Making Genetics Actually Work
Early versions spawned garbage strategies that polluted the gene pool:
Random gene combinations produced nonsensical parameter sets
Weak strategies survived too long, dragging down population
No clear convergence toward optimal solutions
Solution:
Comprehensive fitness scoring (4 factors: win rate, P&L, expectancy, drawdown)
Elite preservation (top 2 always protected)
Walk-forward validation (unproven strategies penalized 30%)
Tournament selection (fitness-weighted breeding)
Adaptive culling (MAS decay creates increasing selection pressure)
Challenge 2: Balancing Evolution Speed vs. Stability
Too fast = population chaos, no convergence. Too slow = can't adapt to regime changes.
Solution:
Dual-phase timing: Fast evolution during historical (30/60 bar intervals), slow during live (200/400 bar intervals)
Adaptive mutation rates: 20% historical, 8% live
Spawn/cull ratio: Always 2:1 to prevent population collapse
Challenge 3: Shadow Portfolio Accuracy
Needed realistic trade simulation without lookahead bias:
Can't peek at future bars for exits
Must track multiple portfolios simultaneously
Stop/target checks must use bar's high/low correctly
Solution:
Entry on close (realistic)
Exit checks on current bar's high/low (realistic)
Independent position tracking per strategy
Cooldown periods to prevent unrealistic rapid re-entry
ATR-normalized P&L (R-multiples) for fair comparison across volatility regimes
Challenge 4: Pine Script Compilation Limits
Hit TradingView's execution limits multiple times:
Too many array operations
Too many variables
Too complex conditional logic
Solution:
Optimized data structures (single DNA array instead of 8 separate arrays)
Minimal visual overlays (only essential plots)
Efficient fitness calculations (vectorized where possible)
Strategic use of barstate.islast to minimize dashboard updates
Challenge 5: Walk-Forward Implementation
Standard WFO is difficult in Pine Script:
Can't easily "roll forward" through historical data
Can't re-optimize strategies mid-stream
Must work in real-time streaming environment
Solution:
Age-based phase detection (first 250 bars = training, next 75 = testing)
Separate metric tracking for train vs. test
Efficiency calculation at fixed interval (after test period completes)
Validation flag persists for strategy lifetime
Challenge 6: Signal Quality Control
Early versions generated too many signals with poor win rates:
Single indicators produced excessive noise
No trend alignment
No regime awareness
Instant entries on single-bar spikes
Solution:
Three-layer confluence system (entropy + momentum + structure)
Minimum 2-of-3 agreement requirement
Trend alignment checks (penalty for counter-trend)
Regime-based probability adjustments
Persistence requirements (signals must hold multiple bars)
Volume confirmation
Quality gate (probability + confluence thresholds)
The Result
A system that:
Truly evolves (not just parameter sweeps)
Truly validates (out-of-sample testing)
Truly adapts (ongoing competition and breeding)
Stays within TradingView's platform constraints
Provides institutional-quality signals
Maintains transparency (full metrics dashboard)
Development time: 3+ months of iterative refinement
Lines of code: ~1500 (highly optimized)
Test instruments: ES, NQ, EURUSD, BTCUSD, SPY, AAPL
Test timeframes: 5min, 15min, 1H, Daily
🎯 FINAL WORDS
The Adaptive Genesis Engine is not just another indicator - it's a living system that learns, adapts, and improves through the same principles that drive biological evolution. Every bar it observes adds to its experience. Every strategy it spawns explores new parameter combinations. Every strategy it culls removes weakness from the gene pool.
This is evolution in action on your charts.
You're not getting a static formula locked in time. You're getting a system that thinks , that competes , that survives through natural selection. The strongest strategies rise to the top. The weakest die. The gene pool improves generation after generation.
AGE doesn't claim to predict the future - it adapts to whatever the future brings. When markets shift from trending to choppy, from calm to volatile, from bullish to bearish - AGE evolves new strategies suited to the new regime.
Use it on any instrument. Any timeframe. Any market condition. AGE will adapt.
This indicator gives you the pure signal intelligence. How you choose to act on it - position sizing, risk management, execution discipline - that's your responsibility. AGE tells you when and how confident . You decide whether and how much .
Trust the process. Respect the evolution. Let Darwin work.
"In markets, as in nature, it is not the strongest strategies that survive, nor the most intelligent - but those most responsive to change."
Taking you to school. — Dskyz, Trade with insight. Trade with anticipation.
— Happy Holiday's
Cari dalam skrip untuk "high low"
RSI Candles Pro [MTF]**RSI Candles Pro**
## **Overview**
The RSI Candles Pro indicator provides an advanced framework for visualizing RSI momentum through candlestick representation, structural analysis, and multi-dimensional confirmation signals. Unlike conventional RSI oscillators that display only a line plot, this system transforms RSI into a complete OHLC candlestick chart with integrated strength metrics, structural break detection, divergence analysis, and dynamic support/resistance mapping.
Each element adapts continuously to RSI behavior, offering traders a living map of momentum shifts, structural changes, and reversal potential. The indicator doesn't simply show overbought/oversold conditions—it quantifies momentum strength, tracks structural breaks, detects price-RSI divergences, and projects key inflection levels with precision.
The result is a comprehensive, momentum-aware representation of market structure:
- **RSI OHLC Candles** visualize momentum direction, strength, and conviction through candlestick patterns with dynamic color intensity.
- **Strength Scoring System** quantifies momentum conviction using distance from neutral, momentum acceleration, and candle body characteristics.
- **RSI Structure Lines & Zones** connect swing highs and lows, creating visual support/resistance zones within RSI space.
- **Break of Structure (BOS) Detection** identifies decisive momentum shifts when RSI breaks previous structural levels, complete with projected support/resistance lines.
- **Auto Pivot Horizontal Lines** dynamically map key RSI levels where price repeatedly reacts, serving as momentum inflection zones.
- **Divergence Detection** captures classic bullish and bearish divergences between price action and RSI behavior, flagging potential reversal conditions.
Unlike static RSI line plots or simple zone highlighting, RSI Candles Pro fuses candlestick visualization with structural awareness, strength quantification, and divergence analysis to provide a clear, multi-dimensional picture of momentum dynamics and potential turning points.
---
## **Theoretical Foundation**
The RSI Candles Pro indicator builds on principles of **momentum oscillation theory**, **structural market analysis**, and **divergence recognition**—concepts widely used by technical analysts to identify trend strength, exhaustion, and reversal conditions.
Standard RSI indicators display momentum as a single line crossing threshold levels, but this approach ignores critical dimensions: **momentum strength**, **structural context**, and **rate of change acceleration**. This indicator recognizes that RSI behavior can be decomposed into candlestick patterns that reveal conviction, hesitation, and reversal signals just as price candles do.
At its core are six interacting components:
### **1. RSI OHLC Candlestick Construction**
The indicator calculates RSI independently for open, high, low, and close prices within each bar, creating true RSI candlesticks rather than a single-line plot. This reveals:
- **Momentum direction** (bullish vs. bearish candles)
- **Momentum volatility** (wick length shows RSI range)
- **Momentum conviction** (body size indicates decisiveness)
- **Indecision patterns** (doji candles signal momentum exhaustion)
### **2. Strength Scoring Algorithm**
A composite strength score quantifies momentum conviction by analyzing three factors:
- **Distance from neutral (50 level)**: Greater distance indicates stronger directional bias
- **Momentum acceleration**: Rate of RSI change over recent bars reveals building or fading momentum
- **Body-to-range ratio**: Larger bodies relative to total candle range show decisive momentum vs. indecision
This produces a 0-100 strength score that dynamically adjusts candle transparency—strong moves appear vibrant, weak moves appear faded—providing instant visual feedback on momentum quality.
### **3. RSI EMA with Slope-Sensitive Coloring**
A smoothed exponential moving average of RSI serves as a trend filter, but with a critical enhancement: **dynamic color coding based on slope direction**. When the RSI EMA slopes upward, it displays in bullish color; when sloping downward, bearish color. This provides instant trend context and filters noise from raw RSI fluctuations.
### **4. RSI Structural Framework**
The indicator identifies swing highs and lows within RSI space using pivot detection, then:
- **Connects consecutive swings with lines** to visualize RSI trend channels
- **Creates shaded zones between swings** to highlight support/resistance regions in momentum space
- **Implements cooloff periods** to prevent redundant signals and maintain chart clarity
These structural elements reveal whether RSI is forming higher highs/higher lows (bullish structure) or lower highs/lower lows (bearish structure).
### **5. Break of Structure (BOS) Logic**
The system detects **decisive momentum shifts** when RSI breaks previous structural levels in alignment with RSI EMA trend direction:
- **Bullish BOS**: RSI breaks above previous swing high while RSI EMA is rising
- **Bearish BOS**: RSI breaks below previous swing low while RSI EMA is falling
When BOS occurs, the indicator automatically:
- Places a BOS label at the breakout point
- Projects a support/resistance line forward (20+ bars)
- Creates a shaded zone around the S/R level
- Provides tooltip information with exact S/R values
This gives traders actionable levels where momentum shifts may be defended or rejected.
### **6. Price-RSI Divergence Detection**
Classic divergence analysis identifies conditions where price and momentum disagree:
- **Bullish Divergence**: Price makes lower low, RSI makes higher low (momentum refusing to confirm weakness)
- **Bearish Divergence**: Price makes higher high, RSI makes lower high (momentum weakening despite price strength)
Divergences often precede significant reversals, providing early warning signals before price structure breaks.
### **7. Auto Pivot Horizontal Lines**
The indicator dynamically tracks historical RSI pivot points and plots horizontal lines at these levels, extended forward in time. These act as **momentum support/resistance zones**—levels where RSI has repeatedly turned in the past and may respect again in the future. The system:
- Detects unique pivot levels (filtering duplicates within 2 RSI points)
- Maintains a configurable maximum number of lines per side
- Optionally extends lines infinitely right for persistent reference
- Labels each line with its exact RSI value
By integrating these elements, the indicator provides both micro-level momentum analysis (individual candle strength) and macro-level structural context (swing patterns, BOS events, divergences, key levels), maintaining clarity while revealing momentum dynamics in real time.
---
## **How It Works**
The RSI Candles Pro indicator operates through layered processing stages:
### **Stage 1: RSI OHLC Calculation**
- Four independent RSI calculations are performed for each bar: RSI(open), RSI(high), RSI(low), RSI(close)
- These are combined to form RSI candlesticks:
- **RSI Open/Close**: Determines candle body direction and size
- **RSI High**: Highest value among all four RSI calculations becomes upper wick
- **RSI Low**: Lowest value among all four RSI calculations becomes lower wick
- This creates a complete candlestick representation in RSI space that mirrors price action behavior
### **Stage 2: Strength Score Computation**
For each RSI candle, a composite strength score is calculated:
This score drives **dynamic transparency**: strong moves (score > 70) display with high opacity, weak moves (score < 40) display faded, providing instant visual feedback on momentum quality.
### **Stage 3: RSI EMA Trend Filter**
- An exponential moving average smooths RSI values over a configurable period (default 9)
- The slope is calculated: `rsiEmaSlope = rsiEMA - rsiEMA `
- Dynamic coloring:
- **Positive slope** → Green/Bullish color
- **Negative slope** → Red/Bearish color
- **Flat slope** → Gray/Neutral color
- This provides trend context and filters out noise from raw RSI oscillations
### **Stage 4: Structural Swing Detection**
- Swing highs and lows are identified using pivot detection with configurable lookback (default 5 bars left/right)
- **Cooloff mechanism** prevents redundant signals by requiring minimum bars between swings (default 8)
- When new swings are detected:
- Previous swing values are stored for BOS comparison
- Lines connect consecutive swings to visualize momentum structure
- Shaded boxes (zones) highlight the range between swings as support/resistance regions
### **Stage 5: Break of Structure (BOS) Analysis**
The system monitors RSI behavior relative to previous structural levels:
**Bullish BOS triggers when:**
1. RSI EMA slope is positive (uptrend filter)
2. Current RSI close exceeds previous swing high
3. Previous bar's RSI was below that swing high (confirms break)
4. Cooloff period has elapsed since last bullish BOS (default 10 bars)
**Bearish BOS triggers when:**
1. RSI EMA slope is negative (downtrend filter)
2. Current RSI close breaks below previous swing low
3. Previous bar's RSI was above that swing low (confirms break)
4. Cooloff period has elapsed since last bearish BOS
Upon BOS detection, the indicator automatically:
- Places a labeled marker at the breakout point
- Calculates S/R level with buffer (e.g., RSI low - 0.5 points for bullish BOS)
- Draws a dashed S/R line extending forward (configurable, default 20 bars)
- Creates a shaded S/R zone (±0.5 points from line)
- Adds an "S/R" label at the line's end
### **Stage 6: Auto Pivot Line Management**
- Pivot highs and lows are detected using a separate lookback period (default 5)
- When a new pivot forms:
- System checks if a similar level already exists (within 2 RSI points)
- If unique, adds a horizontal line at that RSI value
- Lines are stored in arrays with configurable maximum capacity (default 4 per side)
- Oldest lines are automatically removed when capacity is exceeded
- Optional labels display exact RSI values at pivot levels
### **Stage 7: Divergence Detection**
The system compares price pivot points with RSI pivot points:
**Bearish Divergence:**
- Price makes higher high compared to previous pivot high
- RSI makes lower high compared to previous RSI pivot high
- RSI must be above 50 (mid-level) to confirm overbought context
- Triangle-down marker placed above candle with "DIV" text
**Bullish Divergence:**
- Price makes lower low compared to previous pivot low
- RSI makes higher low compared to previous RSI pivot low
- RSI must be below 50 to confirm oversold context
- Triangle-up marker placed below candle with "DIV" text
### **Stage 8: Strength Dot Visualization**
Colored dots appear according to Delta Volume strength:
### **Stage 9: Real-Time Info Table**
Through these processes, the indicator creates a living, adaptive representation of RSI behavior that reveals both momentum strength and structural context in real time.
---
## **Interpretation**
The RSI Candles Pro indicator reframes momentum reading from simple overbought/oversold levels to structured awareness of momentum behavior:
### **Candle Patterns**
- **Large-bodied bullish candles (vibrant green)**: Strong, decisive bullish momentum—continuation likely
- **Large-bodied bearish candles (vibrant red)**: Strong, decisive bearish momentum—continuation likely
- **Small-bodied or doji candles (faded/gray)**: Indecision or momentum exhaustion—reversal possible
- **Long upper wicks**: Failed bullish momentum—rejection at resistance
- **Long lower wicks**: Failed bearish momentum—support holding
### **RSI EMA Trend Context**
- **RSI EMA rising (green)**: Momentum uptrend—favor bullish setups
- **RSI EMA falling (red)**: Momentum downtrend—favor bearish setups
- **RSI EMA flat (gray)**: Momentum consolidation—wait for directional clarity
### **Structural Analysis**
- **RSI making higher swing lows with rising EMA**: Bullish structure intact—look for dip-buying opportunities
- **RSI making lower swing highs with falling EMA**: Bearish structure intact—look for rally-selling opportunities
- **Shaded structure zones**: Key support/resistance in momentum space—expect reactions at these levels
### **Break of Structure Signals**
- **Bullish BOS + S/R line**: Momentum confirming upward shift—S/R line becomes support if price dips
- **Bearish BOS + S/R line**: Momentum confirming downward shift—S/R line becomes resistance if price rallies
- **S/R line break**: Momentum structure failing—potential reversal or deeper retracement
### **Pivot Lines**
- **Price approaching RSI pivot high**: Momentum resistance—watch for rejection or breakout
- **Price approaching RSI pivot low**: Momentum support—watch for bounce or breakdown
- **Multiple pivot lines clustered**: Strong momentum support/resistance zone—high-probability reaction area
### **Divergences**
- **Bullish divergence in oversold zone**: Momentum refusing to make new lows despite price weakness—reversal setup
- **Bearish divergence in overbought zone**: Momentum weakening despite price strength—reversal setup
- **Divergence + structure break**: High-conviction reversal signal—combined technical and momentum confirmation
### **Strength Dots**
- **Large dots**: High-conviction moves—reliable trend continuation signals
- **Small dots**: Low-conviction moves—increased reversal risk, avoid chasing
- **Diamond warnings in extremes**: Overextended conditions—prepare for mean reversion
### **Zone Background**
- **Red background (RSI > 70)**: Overbought—watch for bearish divergence or momentum exhaustion
- **Green background (RSI < 30)**: Oversold—watch for bullish divergence or momentum recovery
- **No background (30-70)**: Neutral zone—rely on structure and BOS for directional bias
---
## **Strategy Integration**
RSI Candles Pro integrates seamlessly into momentum-based and reversal trading systems:
### **Trend Continuation Strategies**
- **Entry trigger**: Bullish BOS in rising RSI EMA context with strong candle (large dot)
- **Confirmation**: Price respecting S/R line as support on pullback
- **Exit**: Bearish divergence or RSI candle indecision (doji) at pivot resistance
### **Reversal Strategies**
- **Setup**: Divergence forming in extreme zone (RSI > 70 or < 30)
- **Trigger**: RSI structure break opposite to prevailing trend (bearish BOS in uptrend)
- **Confirmation**: RSI EMA slope change + decisive candle in reversal direction
- **Entry**: On pullback to S/R line or pivot level
### **Momentum Fade Strategies**
- **Signal**: Small strength dots appearing in extreme zones
- **Setup**: RSI touching pivot resistance/support with indecision candle
- **Entry**: Opposite-direction candle with medium/large dot
- **Stop**: Beyond recent RSI structure level
### **Structure-Based Entries**
- **Align higher-timeframe RSI trend** (EMA slope direction)
- **Wait for lower-timeframe BOS** in alignment with higher trend
- **Enter on retest** of S/R line with strength confirmation (large dot)
- **Scale out** at next pivot level or divergence signal
### **Multi-Indicator Confluence**
Combine RSI Candles Pro with:
- **Price structure indicators** (Smart Money Concepts, market structure) for trade direction
- **Volume indicators** to confirm momentum with participation
- **Volatility indicators** (ATR, Bollinger Bands) for position sizing context
- **Institutional Zone Detector** for volume profile alignment—RSI BOS + price at VAL/VAH = high-conviction entry
### **Multi-Timeframe Coordination**
- **Higher timeframe** (4H-Daily): Identify RSI EMA trend direction and major structure
- **Lower timeframe** (15min-1H): Execute entries on BOS signals aligned with higher timeframe
- **Micro timeframe** (1-5min): Fine-tune entries using strength dots and pivot reactions
---
## **Technical Implementation Details**
### **Core Engine**
- **RSI OHLC calculation**: Four independent RSI computations per bar create candlestick representation
- **Strength scoring**: Multi-factor composite algorithm quantifies momentum conviction
- **Dynamic transparency**: Real-time opacity adjustment based on strength score
### **Structural Framework**
- **Pivot-based swing detection**: Configurable left/right bar lookback with cooloff mechanism
- **Line and zone visualization**: Connects consecutive swings with shaded support/resistance regions
- **Array-based storage**: Previous swing values preserved for BOS comparison logic
### **BOS Detection Engine**
- **Dual-condition logic**: Structure break + trend alignment (RSI EMA slope) required
- **Automatic S/R projection**: Lines, zones, and labels generated upon BOS events
- **Cooloff management**: Prevents signal spam during extended directional moves
### **Divergence System**
- **Price-RSI pivot comparison**: Detects higher-high/lower-high and lower-low/higher-low patterns
- **Zone filtering**: Divergences only trigger in appropriate zones (above/below 50)
- **Visual markers**: Triangle shapes with "DIV" text for instant recognition
### **Auto Pivot Management**
- **Dynamic level tracking**: Arrays store lines, values, and labels
- **Duplicate filtering**: Prevents redundant lines within 2 RSI points
- **Capacity control**: Automatic removal of oldest lines when maximum reached
- **Optional extension**: Lines can extend infinitely right for persistent reference
### **Performance Profile**
- **Lightweight computation**: Efficient pivot detection and array management
- **Real-time responsiveness**: Immediate updates on bar close
- **Scalable across timeframes**: Maintains clarity from 1-minute to daily charts
- **Configurable visual elements**: All features can be toggled for custom layouts
---
## **Optimal Application Parameters**
### **Timeframe Guidance**
**1-5 Minute Charts (Scalping):**
- RSI Length: 9-11 (faster response)
- RSI EMA Length: 5-7
- Structure Lookback: 3-4
- Pivot Lookback: 3-4
- Use Case: Micro momentum shifts, quick BOS entries
**15-60 Minute Charts (Intraday Swing):**
- RSI Length: 14 (standard)
- RSI EMA Length: 9
- Structure Lookback: 5
- Pivot Lookback: 5
- Use Case: Intraday structure breaks, divergence reversals
**4 Hour - Daily Charts (Position Trading):**
- RSI Length: 14-21
- RSI EMA Length: 13-21
- Structure Lookback: 7-10
- Pivot Lookback: 7-10
- Use Case: Major momentum shifts, high-timeframe divergences
### **Suggested Configuration (Default)**
- **RSI Length**: 14 (industry standard)
- **RSI EMA Length**: 9 (smooth but responsive)
- **Overbought Level**: 70
- **Oversold Level**: 30
- **Structure Lookback**: 5 bars
- **Structure Cooloff**: 8 bars
- **BOS Cooloff**: 10 bars
- **S/R Extension**: 20 bars
- **S/R Buffer**: 0.5 RSI points
- **Pivot Lookback**: 5 bars
- **Max Pivot Lines**: 4 per side
- **Divergence Lookback**: 5 bars
- Use strength dots as primary filter—require large dots for entries
- Rely heavily on divergences and structure zones
**Trending Markets:**
- Focus on BOS signals aligned with RSI EMA slope
- Use pivot lines as profit targets
- Ignore counter-trend divergences until RSI EMA changes slope
**Ranging Markets:**
- Emphasize divergences at extreme levels
- Trade bounces from pivot lines
- Reduce reliance on BOS signals (more false breaks)
---
## **Performance Characteristics**
### **High Effectiveness:**
- **Trending markets with clear momentum cycles**: RSI structure aligns with price structure for reliable BOS signals
- **Markets with defined swing patterns**: Pivot lines and structure zones provide accurate support/resistance
- **Divergence-prone assets**: Assets that respect momentum/price divergences (equities, major FX pairs)
- **Timeframes with sufficient volatility**: RSI candles show meaningful patterns when price moves decisively
### **Reduced Effectiveness:**
- **Choppy, sideways markets**: RSI oscillates around 50 with no structural pattern, generating false BOS signals
- **Low-liquidity assets**: Erratic price action creates unreliable RSI swings
- **News-driven volatility spikes**: Sudden moves invalidate structure and create whipsaws
- **Extremely low timeframes (< 1 minute)**: Noise overwhelms signal, structure breaks lack follow-through
### **Optimal Market Conditions:**
- **Clear momentum phases** with defined RSI EMA trend
- **Respect for previous swing levels** in RSI space
- **Volume participation** during BOS events (combine with volume indicator)
- **Alignment between RSI structure and price structure**
---
## **Integration Guidelines**
### **Confluence Framework**
Combine RSI Candles Pro with:
1. **Volume analysis** (Institutional Zone Detector, volume profile) to confirm RSI BOS with volume participation
2. **Price structure** (Smart Money Concepts, order blocks) to align RSI momentum with price levels
3. **Trend indicators** (moving averages, Supertrend) for higher-timeframe directional bias
4. **Volatility indicators** (ATR, Bollinger Bands) for stop-loss and profit target placement
### **Directional Control**
- **Never trade against RSI EMA slope** unless high-conviction divergence present
- **Require BOS alignment** with RSI EMA direction for continuation trades
- **Wait for RSI EMA slope change** before taking counter-trend reversals
### **Risk Calibration**
- **Stop-loss placement**: Beyond recent RSI structure swing (converted to price)
- **Position sizing**: Larger positions for strong candles (large dots) at BOS events
- **Profit targets**: Next pivot line level or opposite-zone boundary (70/30)
- **Trail stops**: Use S/R lines as trailing stop levels after BOS
### **Multi-Timeframe Synergy**
1. **Check higher timeframe** (3x-5x current): RSI EMA slope and major structure
2. **Identify current timeframe**: BOS events and divergences
3. **Execute on lower timeframe** (1/3x-1/5x current): Strength-confirmed entries at pivot levels
4. **Align all timeframes**: Only trade when RSI structure agrees across timeframes
### **Alert Strategy**
Enable alerts for:
- **RSI BOS events**: Immediate notification of momentum structure breaks
- **Divergences**: Early warning of potential reversals
- **Extreme zone entries**: RSI crossing 70/30 levels
- **RSI EMA trend changes**: Shifts in momentum trend direction
---
## **Disclaimer**
The RSI Candles Pro indicator is a professional-grade momentum visualization and structural analysis tool. It is not predictive or guaranteed profitable; performance depends on parameter tuning, market regime, and disciplined execution.
**Key Considerations:**
- RSI is a **derivative indicator** (calculated from price), not a leading indicator—it confirms momentum but does not predict future price
- **Divergences can persist** for extended periods; early entries may require multiple attempts
- **BOS signals may fail** in choppy markets; always use stop-losses and risk management
- **Optimal parameters vary** by asset, timeframe, and volatility regime—backtesting recommended
- **No indicator works in isolation**; combine with price action, volume, and market context
**Best Practices:**
- Paper trade new configurations before risking capital
- Maintain a trading journal to identify which signals work best for your style
- Adjust cooloff periods and lookback lengths based on asset characteristics
- Use in conjunction with fundamental analysis and broader market context
- Never risk more than 1-2% of capital per trade, regardless of indicator signals
This indicator is designed to enhance decision-making, not replace it. Traders should integrate RSI Candles Pro into a comprehensive analytical framework that includes price structure, volume analysis, and risk management protocols. Success requires consistent application of tested strategies, emotional discipline, and continuous adaptation to changing market conditions.
Price levelsPRICE LEVELS INDICATOR - DESCRIPTION
This TradingView indicator displays critical institutional price levels that professional traders use for intraday decision-making. The indicator automatically plots horizontal lines at key support and resistance levels derived from previous and current trading sessions, along with two simple moving averages for trend context.
KEY FEATURES
Daily Levels:
Prior Day High/Low: Yesterday's trading range extremes
Pre-Market High/Low: The highest and lowest prices reached during pre-market hours (4:00 AM - 9:30 AM EST)
Current Day High/Low/Open: Today's intraday extremes and opening price
After-Hours High/Low: Post-market session price extremes (4:00 PM - 8:00 PM EST)
First Bar High/Low: The high and low of the first regular trading session bar
Weekly Levels:
Prior Week High/Low/Close: Last week's price extremes and closing price
Current Week High/Low/Open: This week's ongoing price range and opening level
Moving Averages:
SMA 20 (default): Short-term trend indicator
SMA 200 (default): Long-term trend indicator
HOW TO USE THIS INDICATOR
Installation:
Copy the entire Pine Script code
In TradingView, open the Pine Editor (bottom panel)
Paste the code and click "Add to Chart"
The indicator will overlay directly on your price chart
Configuration:
All settings are accessible through the indicator settings menu (gear icon). You can customize:
Which price levels to display (toggle each level on/off)
Line colors, thickness, and styles (solid, dashed, dotted)
Label display and positioning
Price axis visibility for each level
Label text content and colors
Best Practices for Trading:
Market Structure:
Price above Week Open = bullish bias
Price below Week Open = bearish bias
Use Prior Week Close as major support/resistance
Entry Timing:
Look for bounces off Prior Day High/Low
Pre-Market High/Low often act as breakout triggers
Institutional traders watch these levels closely
Risk Management:
Place stops below/above relevant price levels
Prior Day Low often serves as stop-loss for longs
Prior Day High often serves as stop-loss for shorts
Confluence Trading:
Strongest setups occur when multiple levels align
Example: Price bounces at both Prior Day Low AND Week Open
Combine with moving averages for additional confirmation
Breakout Trading:
Pre-Market High break = potential bullish momentum
Pre-Market Low break = potential bearish momentum
Prior Week High break = strong bullish signal
Prior Week Low break = strong bearish signal
RECOMMENDED SETTINGS
For Day Trading:
Enable: Prior Day High/Low, PM High/Low, Week Open, Prior Week Close
Timeframe: 5-minute or 15-minute charts
Display: "Most recent level on most recent day"
For Swing Trading:
Enable: Prior Week High/Low, Current Week High/Low, Week Open
Timeframe: 1-hour or 4-hour charts
Display: "Most recent level across the chart"
For Scalping:
Enable: PM High/Low, Current Day High/Low
Timeframe: 1-minute or 3-minute charts
Disable weekly levels to reduce clutter
ALERT SETUP
The indicator includes built-in alerts for:
Price crossing above Pre-Market High
Price crossing below Pre-Market Low
Price closing above Pre-Market High
Price closing below Pre-Market Low
To enable alerts:
Right-click on the indicator name
Select "Add Alert"
Choose the desired alert condition
Set alert frequency and notification method
UNDERSTANDING LABEL COLORS
Each price level has a distinct color scheme by default:
Green tones: High levels (resistance)
Red/Pink tones: Low levels (support)
Yellow/Orange: Opening prices
Cyan/Blue: Weekly levels
All colors are fully customizable in the settings to match your chart theme.
TECHNICAL NOTES
The indicator only displays on intraday timeframes (seconds, minutes, hours)
It does not work on daily, weekly, or monthly charts
Lines automatically extend to the current bar
Labels update in real-time as prices move
Pre-market and after-hours levels require extended trading session data enabled in your chart settings
COMMON USE CASES
Gap Trading: Use Pre-Market High/Low to identify gap fill targets
Range Trading: Trade bounces between Prior Day High and Low
Breakout Trading: Enter when price decisively breaks key levels
Trend Following: Combine price levels with SMA 20 and 200 for trend confirmation
Support/Resistance: Use levels as dynamic support/resistance zones
This indicator is designed to give traders immediate visual reference to the price levels that institutional traders and market makers are watching, helping you make informed trading decisions based on areas where significant buying or selling pressure is likely to occur.
Mars Signals - Ultimate Institutional Suite v3.0(Joker)Comprehensive Trading Manual
Mars Signals – Ultimate Institutional Suite v3.0 (Joker)
## Chapter 1 – Philosophy & System Architecture
This script is not a simple “buy/sell” indicator.
Mars Signals – UIS v3.0 (Joker) is designed as an institutional-style analytical assistant that layers several methodologies into a single, coherent framework.
The system is built on four core pillars:
1. Smart Money Concepts (SMC)
- Detection of Order Blocks (professional demand/supply zones).
- Detection of Fair Value Gaps (FVGs) (price imbalances).
2. Smart DCA Strategy
- Combination of RSI and Bollinger Bands
- Identifies statistically discounted zones for scaling into spot positions or exiting shorts.
3. Volume Profile (Visible Range Simulation)
- Distribution of volume by price, not by time.
- Identification of POC (Point of Control) and high-/low-volume areas.
4. Wyckoff Helper – Spring
- Detection of bear traps, liquidity grabs, and sharp bullish reversals.
All four pillars feed into a Confluence Engine (Scoring System).
The final output is presented in the Dashboard, with a clear, human-readable signal:
- STRONG LONG 🚀
- WEAK LONG ↗
- NEUTRAL / WAIT
- WEAK SHORT ↘
- STRONG SHORT 🩸
This allows the trader to see *how many* and *which* layers of the system support a bullish or bearish bias at any given time.
## Chapter 2 – Settings Overview
### 2.1 General & Dashboard Group
- Show Dashboard Panel (`show_dash`)
Turns the dashboard table in the corner of the chart ON/OFF.
- Show Signal Recommendation (`show_rec`)
- If enabled, the textual signal (STRONG LONG, WEAK SHORT, etc.) is displayed.
- If disabled, you only see feature status (ON/OFF) and the current price.
- Dashboard Position (`dash_pos`)
Determines where the dashboard appears on the chart:
- `Top Right`
- `Bottom Right`
- `Top Left`
### 2.2 Smart Money (SMC) Group
- Enable SMC Strategy (`show_smc`)
Globally enables or disables the Order Block and FVG logic.
- Order Block Pivot Lookback (`ob_period`)
Main parameter for detecting key pivot highs/lows (swing points).
- Default value: 5
- Concept:
A bar is considered a pivot low if its low is lower than the lows of the previous 5 and the next 5 bars.
Similarly, a pivot high has a high higher than the previous 5 and the next 5 bars.
These pivots are used as anchors for Order Blocks.
- Increasing `ob_period`:
- Fewer levels.
- But levels tend to be more significant and reliable.
- In highly volatile markets (major news, war events, FOMC, etc.),
using values 7–10 is recommended to filter out weak levels.
- Show Fair Value Gaps (`show_fvg`)
Enables/disables the drawing of FVG zones (imbalances).
- Bullish OB Color (`c_ob_bull`)
- Color of Bullish Order Blocks (Demand Zones).
- Default: semi-transparent green (transparency ≈ 80).
- Bearish OB Color (`c_ob_bear`)
- Color of Bearish Order Blocks (Supply Zones).
- Default: semi-transparent red.
- Bullish FVG Color (`c_fvg_bull`)
- Color of Bullish FVG (upward imbalance), typically yellow.
- Bearish FVG Color (`c_fvg_bear`)
- Color of Bearish FVG (downward imbalance), typically purple.
### 2.3 Smart DCA Strategy Group
- Enable DCA Zones (`show_dca`)
Enables the Smart DCA logic and visual labels.
- RSI Length (`rsi_len`)
Lookback period for RSI (default: 14).
- Shorter → more sensitive, more noise.
- Longer → fewer signals, higher reliability.
- Bollinger Bands Length (`bb_len`)
Moving average period for Bollinger Bands (default: 20).
- BB Multiplier (`bb_mult`)
Standard deviation multiplier for Bollinger Bands (default: 2.0).
- For extremely volatile markets, values like 2.5–3.0 can be used so that only extreme deviations trigger a DCA signal.
### 2.4 Volume Profile (Visible Range Sim) Group
- Show Volume Profile (`show_vp`)
Enables the simulated Volume Profile bars on the right side of the chart.
- Volume Lookback Bars (`vp_lookback`)
Number of bars used to compute the Volume Profile (default: 150).
- Higher values → broader historical context, heavier computation.
- Row Count (`vp_rows`)
Number of vertical price segments (rows) to divide the total price range into (default: 30).
- Width (%) (`vp_width`)
Relative width of each volume bar as a percentage.
In the code, bar widths are scaled relative to the row with the maximum volume.
> Technical note: Volume Profile calculations are executed only on the last bar (`barstate.islast`) to keep the script performant even on higher timeframes.
### 2.5 Wyckoff Helper Group
- Show Wyckoff Events (`show_wyc`)
Enables detection and plotting of Wyckoff Spring events.
- Volume MA Length (`vol_ma_len`)
Length of the moving average on volume.
A bar is considered to have Ultra Volume if its volume is more than 2× the volume MA.
## Chapter 3 – Smart Money Strategy (Order Blocks & FVG)
### 3.1 What Is an Order Block?
An Order Block (OB) represents the footprint of large institutional orders:
- Bullish Order Block (Demand Zone)
The last selling region (bearish candle/cluster) before a strong upward move.
- Bearish Order Block (Supply Zone)
The last buying region (bullish candle/cluster) before a strong downward move.
Institutions and large players place heavy orders in these regions. Typical price behavior:
- Price moves away from the zone.
- Later returns to the same zone to fill unfilled orders.
- Then continues the larger trend.
In the script:
- If `pl` (pivot low) forms → a Bullish OB is created.
- If `ph` (pivot high) forms → a Bearish OB is created.
The box is drawn:
- From `bar_index ` to `bar_index`.
- Between `low ` and `high `.
- `extend=extend.right` extends the OB into the future, so it acts as a dynamic support/resistance zone.
- Only the last 4 OB boxes are kept to avoid clutter.
### 3.2 Order Block Color Guide
- Semi-transparent Green (`c_ob_bull`)
- Represents a Bullish Order Block (Demand Zone).
- Interpretation: a price region with a high probability of bullish reaction.
- Semi-transparent Red (`c_ob_bear`)
- Represents a Bearish Order Block (Supply Zone).
- Interpretation: a price region with a high probability of bearish reaction.
Overlap (Multiple OBs in the Same Area)
When two or more Order Blocks overlap:
- The shared area appears visually denser/stronger.
- This suggests higher order density.
- Such zones can be treated as high-priority levels for entries, exits, and stop-loss placement.
### 3.3 Demand/Supply Logic in the Scoring Engine
is_in_demand = low <= ta.lowest(low, 20)
is_in_supply = high >= ta.highest(high, 20)
- If current price is near the lowest lows of the last 20 bars, it is considered in a Demand Zone → positive impact on score.
- If current price is near the highest highs of the last 20 bars, it is considered in a Supply Zone → negative impact on score.
This logic complements Order Blocks and helps the Dashboard distinguish whether:
- Market is currently in a statistically cheap (long-friendly) area, or
- In a statistically expensive (short-friendly) area.
### 3.4 Fair Value Gaps (FVG)
#### Concept
When the market moves aggressively:
- Some price levels are skipped and never traded.
- A gap between wicks/shadows of consecutive candles appears.
- These regions are called Fair Value Gaps (FVGs) or Imbalances.
The market generally “dislikes” imbalance and often:
- Returns to these zones in the future.
- Fills the gap (rebalance).
- Then resumes its dominant direction.
#### Implementation in the Code
Bullish FVG (Yellow)
fvg_bull_cond = show_smc and show_fvg and low > high and close > high
if fvg_bull_cond
box.new(bar_index , high , bar_index, low, ...)
Core condition:
`low > high ` → the current low is above the high of two bars ago; the space between them is an untraded gap.
Bearish FVG (Purple)
fvg_bear_cond = show_smc and show_fvg and high < low and close < low
if fvg_bear_cond
box.new(bar_index , low , bar_index, high, ...)
Core condition:
`high < low ` → the current high is below the low of two bars ago; again a price gap exists.
#### FVG Color Guide
- Transparent Yellow (`c_fvg_bull`) – Bullish FVG
Often acts like a magnet for price:
- Price tends to retrace into this zone,
- Fill the imbalance,
- And then continue higher.
- Transparent Purple (`c_fvg_bear`) – Bearish FVG
Price tends to:
- Retrace upward into the purple area,
- Fill the imbalance,
- And then resume downward movement.
#### Trading with FVGs
- FVGs are *not* standalone entry signals.
They are best used as:
- Targets (take-profit zones), or
- Reaction areas where you expect a pause or reversal.
Examples:
- If you are long, a bearish FVG above is often an excellent take-profit zone.
- If you are short, a bullish FVG below is often a good cover/exit zone.
### 3.5 Core SMC Trading Templates
#### Reversal Long
1. Price trades down into a green Order Block (Demand Zone).
2. A bullish confirmation candle (Close > Open) forms inside or just above the OB.
3. If this zone is close to or aligned with a bullish FVG (yellow), the signal is reinforced.
4. Entry:
- At the close of the confirmation candle, or
- Using a limit order near the upper boundary of the OB.
5. Stop-loss:
- Slightly below the OB.
- If the OB is broken decisively and price consolidates below it, the zone loses validity.
6. Targets:
- The next FVG,
- Or the next red Order Block (Supply Zone) above.
#### Reversal Short
The mirror scenario:
- Price rallies into a red Order Block (Supply).
- A bearish confirmation candle forms (Close < Open).
- FVG/premium structure above can act as a confluence.
- Stop-loss goes above the OB.
- Targets: lower FVGs or subsequent green OBs below.
## Chapter 4 – Smart DCA Strategy (RSI + Bollinger Bands)
### 4.1 Smart DCA Concept
- Classic DCA = buying at fixed time intervals regardless of price.
- Smart DCA = scaling in only when:
- Price is statistically cheaper than usual, and
- The market is in a clear oversold condition.
Code logic:
rsi_val = ta.rsi(close, rsi_len)
= ta.bb(close, bb_len, bb_mult)
dca_buy = show_dca and rsi_val < 30 and close < bb_lower
dca_sell = show_dca and rsi_val > 70 and close > bb_upper
Conditions:
- DCA Buy – Smart Scale-In Zone
- RSI < 30 → oversold.
- Close < lower Bollinger Band → price has broken below its typical volatility envelope.
- DCA Sell – Overbought/Distribution Zone
- RSI > 70 → overbought.
- Close > upper Bollinger Band → price is extended far above the mean.
### 4.2 Visual Representation on the Chart
- Green “DCA” Label Below Candle
- Shape: `labelup`.
- Color: lime background, white text.
- Meaning: statistically attractive level for laddered spot entries or short exits.
- Red “SELL” Label Above Candle
- Warning that the market is in an extended, overbought condition.
- Suitable for profit-taking on longs or considering short entries (with proper confluence and risk management).
- Light Green Background (`bgcolor`)
- When `dca_buy` is true, the candle background turns very light green (high transparency).
- This helps visually identify DCA Zones across the chart at a glance.
### 4.3 Practical Use in Trading
#### Spot Trading
Used to build a better average entry price:
- Every time a DCA label appears, allocate a fixed portion of capital (e.g., 2–5%).
- Combining DCA signals with:
- Green OBs (Demand Zones), and/or
- The Volume Profile POC
makes the zone structurally more important.
#### Futures Trading
- Longs
- Use DCA Buy signals as low-risk zones for opening or adding to longs when:
- Price is inside a green OB, or
- The Dashboard already leans LONG.
- Shorts
- Use DCA Sell signals as:
- Exit zones for longs, or
- Areas to initiate shorts with stops above structural highs.
## Chapter 5 – Volume Profile (Visible Range Simulation)
### 5.1 Concept
Traditional volume (histogram under the chart) shows volume over time.
Volume Profile shows volume by price level:
- At which prices has the highest trading activity occurred?
- Where did buyers and sellers agree the most (High Volume Nodes – HVNs)?
- Where did price move quickly due to low participation (Low Volume Nodes – LVNs)?
### 5.2 Implementation in the Script
Executed only when `show_vp` is enabled and on the last bar:
1. The last `vp_lookback` bars (default 150) are processed.
2. The minimum low and maximum high over this window define the price range.
3. This price range is divided into `vp_rows` segments (e.g., 30 rows).
4. For each row:
- All bars are scanned.
- If the mid-price `(high + low ) / 2` falls inside a row, that bar’s volume is added to the row total.
5. The row with the greatest volume is stored as `max_vol_idx` (the POC row).
6. For each row, a volume box is drawn on the right side of the chart.
### 5.3 Color Scheme
- Semi-transparent Orange
- The row with the maximum volume – the Point of Control (POC).
- Represents the strongest support/resistance level from a volume perspective.
- Semi-transparent Blue
- Other volume rows.
- The taller the bar → the higher the volume → the stronger the interest at that price band.
### 5.4 Trading Applications
- If price is above POC and retraces back into it:
→ POC often acts as support, suitable for long setups.
- If price is below POC and rallies into it:
→ POC often acts as resistance, suitable for short setups or profit-taking.
HVNs (Tall Blue Bars)
- Represent areas of equilibrium where the market has spent time and traded heavily.
- Price tends to consolidate here before choosing a direction.
LVNs (Short or Nearly Empty Bars)
- Represent low participation zones.
- Price often moves quickly through these areas – useful for targeting fast moves.
## Chapter 6 – Wyckoff Helper – Spring
### 6.1 Spring Concept
In the Wyckoff framework:
- A Spring is a false break of support.
- The market briefly trades below a well-defined support level, triggers stop losses,
then sharply reverses upward as institutional buyers absorb liquidity.
This movement:
- Clears out weak hands (retail sellers).
- Provides large players with liquidity to enter long positions.
- Often initiates a new uptrend.
### 6.2 Code Logic
Conditions for a Spring:
1. The current low is lower than the lowest low of the previous 50 bars
→ apparent break of a long-standing support.
2. The bar closes bullish (Close > Open)
→ the breakdown was rejected.
3. Volume is significantly elevated:
→ `volume > 2 × volume_MA` (Ultra Volume).
When all conditions are met and `show_wyc` is enabled:
- A pink diamond is plotted below the bar,
- With the label “Spring” – one of the strongest long signals in this system.
### 6.3 Trading Use
- After a valid Spring, markets frequently enter a meaningful bullish phase.
- The highest quality setups occur when:
- The Spring forms inside a green Order Block, and
- Near or on the Volume Profile POC.
Entries:
- At the close of the Spring bar, or
- On the first pullback into the mid-range of the Spring candle.
Stop-loss:
- Slightly below the Spring’s lowest point (wick low plus a small buffer).
## Chapter 7 – Confluence Engine & Dashboard
### 7.1 Scoring Logic
For each bar, the script:
1. Resets `score` to 0.
2. Adjusts the score based on different signals.
SMC Contribution
if show_smc
if is_in_demand
score += 1
if is_in_supply
score -= 1
- Being in Demand → `+1`
- Being in Supply → `-1`
DCA Contribution
if show_dca
if dca_buy
score += 2
if dca_sell
score -= 2
- DCA Buy → `+2` (strong, statistically driven long signal)
- DCA Sell → `-2`
Wyckoff Spring Contribution
if show_wyc
if wyc_spring
score += 2
- Spring → `+2` (entry of strong money)
### 7.2 Mapping Score to Dashboard Signal
- score ≥ 2 → STRONG LONG 🚀
Multiple bullish conditions aligned.
- score = 1 → WEAK LONG ↗
Some bullish bias, but only one layer clearly positive.
- score = 0 → NEUTRAL / WAIT
Rough balance between buying and selling forces; staying flat is usually preferable.
- score = -1 → WEAK SHORT ↘
Mild bearish bias, suited for cautious or short-term plays.
- score ≤ -2 → STRONG SHORT 🩸
Convergence of several bearish signals.
### 7.3 Dashboard Structure
The dashboard is a two-column table:
- Row 0
- Column 0: `"Mars Signals"` – black background, white text.
- Column 1: `"UIS v3.0"` – black background, yellow text.
- Row 1
- Column 0: `"Price:"` (light grey background).
- Column 1: current closing price (`close`) with a semi-transparent blue background.
- Row 2
- Column 0: `"SMC:"`
- Column 1:
- `"ON"` (green) if `show_smc = true`
- `"OFF"` (grey) otherwise.
- Row 3
- Column 0: `"DCA:"`
- Column 1:
- `"ON"` (green) if `show_dca = true`
- `"OFF"` (grey) otherwise.
- Row 4
- Column 0: `"Signal:"`
- Column 1: signal text (`status_txt`) with background color `status_col`
(green, red, teal, maroon, etc.)
- If `show_rec = false`, these cells are cleared.
## Chapter 8 – Visual Legend (Colors, Shapes & Actions)
For quick reading inside TradingView, the visual elements are described line by line instead of a table.
Chart Element: Green Box
Color / Shape: Transparent green rectangle
Core Meaning: Bullish Order Block (Demand Zone)
Suggested Trader Response: Look for longs, Smart DCA adds, closing or reducing shorts.
Chart Element: Red Box
Color / Shape: Transparent red rectangle
Core Meaning: Bearish Order Block (Supply Zone)
Suggested Trader Response: Look for shorts, or take profit on existing longs.
Chart Element: Yellow Area
Color / Shape: Transparent yellow zone
Core Meaning: Bullish FVG / upside imbalance
Suggested Trader Response: Short take-profit zone or expected rebalance area.
Chart Element: Purple Area
Color / Shape: Transparent purple zone
Core Meaning: Bearish FVG / downside imbalance
Suggested Trader Response: Long take-profit zone or temporary supply region.
Chart Element: Green "DCA" Label
Color / Shape: Green label with white text, plotted below the candle
Core Meaning: Smart ladder-in buy zone, DCA buy opportunity
Suggested Trader Response: Spot DCA entry, partial short exit.
Chart Element: Red "SELL" Label
Color / Shape: Red label with white text, plotted above the candle
Core Meaning: Overbought / distribution zone
Suggested Trader Response: Take profit on longs, consider initiating shorts.
Chart Element: Light Green Background (bgcolor)
Color / Shape: Very transparent light-green background behind bars
Core Meaning: Active DCA Buy zone
Suggested Trader Response: Treat as a discount zone on the chart.
Chart Element: Orange Bar on Right
Color / Shape: Transparent orange horizontal bar in the volume profile
Core Meaning: POC – price with highest traded volume
Suggested Trader Response: Strong support or resistance; key reference level.
Chart Element: Blue Bars on Right
Color / Shape: Transparent blue horizontal bars in the volume profile
Core Meaning: Other volume levels, showing high-volume and low-volume nodes
Suggested Trader Response: Use to identify balance zones (HVN) and fast-move corridors (LVN).
Chart Element: Pink "Spring" Diamond
Color / Shape: Pink diamond with white text below the candle
Core Meaning: Wyckoff Spring – liquidity grab and potential major bullish reversal
Suggested Trader Response: One of the strongest long signals in the suite; look for high-quality long setups with tight risk.
Chart Element: STRONG LONG in Dashboard
Color / Shape: Green background, white text in the Signal row
Core Meaning: Multiple bullish layers in confluence
Suggested Trader Response: Consider initiating or increasing longs with strict risk management.
Chart Element: STRONG SHORT in Dashboard
Color / Shape: Red background, white text in the Signal row
Core Meaning: Multiple bearish layers in confluence
Suggested Trader Response: Consider initiating or increasing shorts with a logical, well-placed stop.
## Chapter 9 – Timeframe-Based Trading Playbook
### 9.1 Timeframe Selection
- Scalping
- Timeframes: 1M, 5M, 15M
- Objective: fast intraday moves (minutes to a few hours).
- Recommendation: focus on SMC + Wyckoff.
Smart DCA on very low timeframes may introduce excessive noise.
- Day Trading
- Timeframes: 15M, 1H, 4H
- Provides a good balance between signal quality and frequency.
- Recommendation: use the full stack – SMC + DCA + Volume Profile + Wyckoff + Dashboard.
- Swing Trading & Position Investing
- Timeframes: Daily, Weekly
- Emphasis on Smart DCA + Volume Profile.
- SMC and Wyckoff are used mainly to fine-tune swing entries within larger trends.
### 9.2 Scenario A – Scalping Long
Example: 5-Minute Chart
1. Price is declining into a green OB (Bullish Demand).
2. A candle with a long lower wick and bullish close (Pin Bar / Rejection) forms inside the OB.
3. A Spring diamond appears below the same candle → very strong confluence.
4. The Dashboard shows at least WEAK LONG ↗, ideally STRONG LONG 🚀.
5. Entry:
- On the close of the confirmation candle, or
- On the first pullback into the mid-range of that candle.
6. Stop-loss:
- Slightly below the OB.
7. Targets:
- Nearby bearish FVG above, and/or
- The next red OB.
### 9.3 Scenario B – Day-Trading Short
Recommended Timeframes: 1H or 4H
1. The market completes a strong impulsive move upward.
2. Price enters a red Order Block (Supply).
3. In the same zone, a purple FVG appears or remains unfilled.
4. On a lower timeframe (e.g., 15M), RSI enters overbought territory and a DCA Sell signal appears.
5. The main timeframe Dashboard (1H) shows WEAK SHORT ↘ or STRONG SHORT 🩸.
Trade Plan
- Open a short near the upper boundary of the red OB.
- Place the stop above the OB or above the last swing high.
- Targets:
- A yellow FVG lower on the chart, and/or
- The next green OB (Demand) below.
### 9.4 Scenario C – Swing / Investment with Smart DCA
Timeframes: Daily / Weekly
1. On the daily or weekly chart, each time a green “DCA” label appears:
- Allocate a fixed fraction of your capital (e.g., 3–5%) to that asset.
2. Check whether this DCA zone aligns with the orange POC of the Volume Profile:
- If yes → the quality of the entry zone is significantly higher.
3. If the DCA signal sits inside a daily green OB, the probability of a medium-term bottom increases.
4. Always build the position laddered, never all-in at a single price.
Exits for investors:
- Near weekly red OBs or large purple FVG zones.
- Ideally via partial profit-taking rather than closing 100% at once.
### 9.5 Case Study 1 – BTCUSDT (15-Minute)
- Context: Price has sold off down towards 65,000 USD.
- A green OB had previously formed at that level.
- Near the lower boundary of this OB, a partially filled yellow FVG is present.
- As price returns to this region, a Spring appears.
- The Dashboard shifts from NEUTRAL / WAIT to WEAK LONG ↗.
Plan
- Enter a long near the OB low.
- Place stop below the Spring low.
- First target: a purple FVG around 66,200.
- Second (optional) target: the first red OB above that level.
### 9.6 Case Study 2 – Meme Coin (PEPE – 4H)
- After a strong pump, price enters a corrective phase.
- On the 4H chart, RSI drops below 30; price breaks below the lower Bollinger Band → a DCA label prints.
- The Volume Profile shows the POC at approximately the same level.
- The Dashboard displays STRONG LONG 🚀.
Plan
- Execute laddered buys in the combined DCA + POC zone.
- Place a protective stop below the last significant swing low.
- Target: an expected 20–30% upside move towards the next red OB or purple FVG.
## Chapter 10 – Risk Management, Psychology & Advanced Tuning
### 10.1 Risk Management
No signal, regardless of its strength, replaces risk control.
Recommendations:
- In futures, do not expose more than 1–3% of account equity to risk per trade.
- Adjust leverage to the volatility of the instrument (lower leverage for highly volatile altcoins).
- Place stop-losses in zones where the idea is clearly invalidated:
- Below/above the relevant Order Block or Spring, not randomly in the middle of the structure.
### 10.2 Market-Specific Parameter Tuning
- Calmer Markets (e.g., major FX pairs)
- `ob_period`: 3–5.
- `bb_mult`: 2.0 is usually sufficient.
- Highly Volatile Markets (Crypto, news-driven assets)
- `ob_period`: 7–10 to highlight only the most robust OBs.
- `bb_mult`: 2.5–3.0 so that only extreme deviations trigger DCA.
- `vol_ma_len`: increase (e.g., to ~30) so that Spring triggers only on truly exceptional
volume spikes.
### 10.3 Trading Psychology
- STRONG LONG 🚀 does not mean “risk-free”.
It means the probability of a successful long, given the model’s logic, is higher than average.
- Treat Mars Signals as a confirmation and context system, not a full replacement for your own decision-making.
- Example of disciplined thinking:
- The Dashboard prints STRONG LONG,
- But price is simultaneously testing a multi-month macro resistance or a major negative news event is imminent,
- In such cases, trade smaller, widen stops appropriately, or skip the trade.
## Chapter 11 – Technical Notes & FAQ
### 11.1 Does the Script Repaint?
- Order Blocks and Springs are based on completed pivot structures and confirmed candles.
- Until a pivot is confirmed, an OB does not exist; after confirmation, behavior is stable under classic SMC assumptions.
- The script is designed to be structurally consistent rather than repainting signals arbitrarily.
### 11.2 Computational Load of Volume Profile
- On the last bar, the script processes up to `vp_lookback` bars × `vp_rows` rows.
- On very low timeframes with heavy zooming, this can become demanding.
- If you experience performance issues:
- Reduce `vp_lookback` or `vp_rows`, or
- Temporarily disable Volume Profile (`show_vp = false`).
### 11.3 Multi-Timeframe Behavior
- This version of the script is not internally multi-timeframe.
All logic (OB, DCA, Spring, Volume Profile) is computed on the active timeframe only.
- Practical workflow:
- Analyze overall structure and key zones on higher timeframes (4H / Daily).
- Use lower timeframes (15M / 1H) with the same tool for timing entries and exits.
## Conclusion
Mars Signals – Ultimate Institutional Suite v3.0 (Joker) is a multi-layer trading framework that unifies:
- Price structure (Order Blocks & FVG),
- Statistical behavior (Smart DCA via RSI + Bollinger),
- Volume distribution by price (Volume Profile with POC, HVN, LVN),
- Liquidity events (Wyckoff Spring),
into a single, coherent system driven by a transparent Confluence Scoring Engine.
The final output is presented in clear, actionable language:
> STRONG LONG / WEAK LONG / NEUTRAL / WEAK SHORT / STRONG SHORT
The system is designed to support professional decision-making, not to replace it.
Used together with strict risk management and disciplined execution,
Mars Signals – UIS v3.0 (Joker) can serve as a central reference manual and operational guide
for your trading workflow, from scalping to swing and investment positioning.
Curvature Tensor Pivots🌀 Curvature Tensor Pivots
Curvature Tensor Pivots: Geometric Pivot Detection Through Differential Geometry
Curvature Tensor Pivots applies mathematical differential geometry to market price analysis, identifying pivots by measuring how price trajectories bend through space. Unlike traditional pivot indicators that rely solely on price highs and lows, this system calculates the actual geometric curvature of price paths and detects inflection points where the curvature changes sign or magnitude—the mathematical hallmarks of directional transitions.
The indicator combines three components: precise curvature measurement using second-derivative calculus, tensor weighting that multiplies curvature by volatility and momentum, and a tension-based prediction system that identifies compression before pivots form. This creates a forward-looking pivot detector with built-in confirmation mechanics.
What Makes This Original
Pure Mathematical Foundation
This indicator implements the classical differential geometry curvature formula κ = |y''| / (1 + y'²)^(3/2), which measures how sharply a curve bends at any given point. In price analysis, high curvature indicates sharp directional changes (active pivots), while curvature approaching zero indicates straight-line motion (inflection points forming). This mathematical approach is fundamentally different from pattern recognition or statistical pivots—it measures the actual geometry of price movement.
Tensor Weighting System
The core innovation is the tensor scoring mechanism, which multiplies geometric curvature by two market-state variables: volatility (ATR expansion/compression) and momentum (rate of change strength). This creates a multi-dimensional strength metric that distinguishes between meaningful pivots and noise. A high tensor score means high curvature is occurring during significant volatility with strong momentum—a genuine structural turning point. Low tensor scores during high curvature indicate choppy, low-conviction moves.
Tension-Based Prediction
The system calculates tension as the inverse of curvature (Tension = 1 - κ). When curvature is low, tension is high, indicating price is moving in a straight line and approaching an inflection point where it must curve. The tension cloud visualizes this compression, tightening before pivots form and expanding after they complete. This provides anticipatory signals rather than purely reactive confirmation.
Integrated Confirmation Architecture
Rather than simply flagging high curvature, the system requires convergence of four elements: geometric inflection detection (sign changes in second derivative or curvature extrema), traditional price structure pivots (pivot highs/lows), tensor strength above threshold, and minimum spacing between signals. This multi-layer confirmation prevents false signals while maintaining sensitivity to genuine turning points.
This is not a combination of existing indicators—it's an application of pure mathematical concepts (differential calculus and tensor algebra) to market geometry, creating a unique analytical framework.
Core Components and How They Work Together
1. Differential Geometry Engine
The foundation is calculus-based trajectory analysis. The system treats price as a function y(t) and calculates:
First derivative (y'): The slope of the price trajectory, representing directional velocity
Second derivative (y''): The acceleration of slope change, representing how quickly direction is shifting
Curvature (κ): The normalized geometric bend, calculated using the formula κ = |y''| / (1 + y'²)^(3/2)
This curvature value is then normalized to a 0-1 range using adaptive statistical bounds (mean ± 2 standard deviations over a rolling window). High κ values indicate sharp bends (active pivots), while κ approaching zero indicates inflection points where the trajectory is straightening before changing concavity.
2. Tensor Weighting Components
The raw curvature is weighted by market dynamics to create the tensor score:
Volatility Component: Calculated as current ATR divided by baseline ATR (smoothed average). Values above 1.0 indicate expansion (higher conviction moves), while values below 1.0 indicate compression (lower reliability). This ensures pivots forming during volatile periods receive higher scores than those in quiet conditions.
Momentum Component: Measured using rate of change (ROC) strength normalized by recent average. High momentum indicates sustained directional pressure, confirming that curvature changes represent genuine trend shifts rather than noise.
Tensor Score Fusion: The final tensor score = κ × Volatility × Momentum × Direction × Gain. This creates a directional strength metric ranging from -1 (strong bearish curvature) to +1 (strong bullish curvature). The magnitude represents conviction, while the sign represents direction.
These components work together by filtering geometric signals through market-state context. A high curvature reading during low volatility and weak momentum produces a low tensor score (likely noise), while the same curvature during expansion and strong momentum produces a high tensor score (likely genuine pivot).
3. Inflection Point Detection System
Inflection points occur where the second derivative changes sign (concave to convex or vice versa) or where curvature reaches local extrema. The system detects these through multiple methods:
Sign change detection: When y'' crosses zero, the price trajectory is transitioning from curving upward to downward (or vice versa)
Curvature extrema: When κ reaches a local maximum or minimum, indicating peak bend intensity
Near-zero curvature: When κ falls below an adaptive threshold, indicating straight-line motion before a directional change
These geometric signals are combined with traditional pivot detection (pivot highs and lows using configurable lookback/lookahead periods) to create confirmed inflection zones. The geometric math identifies WHERE inflections are forming, while price structure confirms WHEN they've completed.
4. Tension Cloud Prediction
Tension is calculated as 1 - κ, creating an inverse relationship where low curvature produces high tension. This represents the "straightness" of price trajectory—when price moves in a straight line, it's building tension that must eventually release through a curved pivot.
The tension cloud width adapts to this tension value: it tightens (narrows) when curvature is low and tension is high, providing visual warning that a pivot is forming. After the pivot completes and curvature increases, tension drops and the cloud expands, confirming the turn.
This creates a leading indicator component within the system: watch for the cloud to compress, then wait for the pivot marker and tensor direction confirmation to enter trades.
5. Multi-Layer Visualization System
The visual components work hierarchically:
Curvature ribbons (foundation): Width expands with curvature magnitude, color shifts with tensor direction (green bullish, red bearish)
Tension cloud (prediction): Purple overlay that compresses before pivots and expands after
Tensor waves (context): Harmonic oscillating layers driven by three phase accumulators (curvature, tensor magnitude, volatility), creating visual texture that becomes erratic before pivots and smooth during trends
Inflection zones (timing): Golden background highlighting when geometric conditions indicate inflection points forming
Pivot markers (confirmation): Triangles marking confirmed pivots where geometric inflection + price structure + tensor strength all align
Each layer adds information without redundancy: ribbons show current state, tension shows prediction, waves show regime character, zones show geometric timing, and markers show confirmed entries.
Calculation Methodology
Phase 1 - Derivative Calculations
Price is normalized by dividing by a 50-period moving average to improve numerical stability. The first derivative is calculated as the bar-to-bar change, then smoothed using a configurable smoothing length (default 3 bars) to reduce noise while preserving structure.
The second derivative is calculated as the bar-to-bar change in the first derivative, also smoothed. This represents the acceleration of directional change—positive values indicate price is curving upward (concave up), negative values indicate curving downward (concave down).
Phase 2 - Curvature Formula
The classical curvature formula is applied:
Calculate y'² (first derivative squared)
Calculate (1 + y'²)^1.5 as the denominator
Divide |y''| by this denominator to get raw curvature κ
This formula ensures curvature is properly normalized regardless of the steepness of the trajectory. A vertical line with high slope (large y') can still have low curvature (straight), while a gradual slope with changing direction produces high curvature (curved).
The raw curvature is then normalized to 0-1 range using adaptive bounds (rolling mean ± 2 standard deviations), allowing the system to adapt to different market volatility regimes.
Phase 3 - Tensor Weighting
ATR is calculated over the specified volatility length (default 14). Current ATR is divided by smoothed ATR to create the volatility ratio. Momentum is calculated as the rate of change over the momentum length (default 10), normalized by recent average ROC.
The tensor score is computed as: Curvature × Volatility × Momentum × Tensor Gain × Direction Sign
This creates the final directional strength metric used for ribbon coloring and signal generation.
Phase 4 - Inflection Detection
Multiple conditions are evaluated simultaneously:
Second derivative sign changes (y'' × y'' < 0)
Curvature local maxima (previous bar κ > current bar κ AND previous bar κ > two bars ago κ)
Curvature local minima (opposite condition)
Low curvature threshold (current κ < adaptive threshold)
Any of these conditions triggers inflection zone highlighting. For confirmed pivot signals, inflection detection must coincide with traditional pivot highs/lows AND tensor magnitude must exceed threshold AND minimum spacing since last signal must be satisfied.
Phase 5 - Tension Calculation
Tension = 1 - κ (smoothed)
This inverse relationship creates the compression/expansion dynamic. When curvature approaches zero (straight trajectory), tension approaches 1 (maximum compression). When curvature is high (sharp bend), tension approaches zero (released).
The tension cloud bands are calculated as: Basis ± (Ribbon Width × Tension)
This creates the visual tightening effect before pivots.
Phase 6 - Wave Generation
Three phase accumulators are maintained:
Phase 1: Accumulates based on curvature magnitude (0.1 × κ per bar)
Phase 2: Accumulates based on tensor magnitude (0.15 × tensor per bar)
Phase 3: Accumulates based on volatility (0.08 × volatility per bar)
For each wave layer (2-8 configurable), a unique frequency is used (layer number × 0.6). The wave offset is calculated as:
Amplitude × (sin(phase1 × frequency) × 0.4 + sin(phase2 × frequency × 1.2) × 0.35 + sin(phase3 × frequency × 0.8) × 0.25)
This creates complex harmonic motion that reflects the interplay of curvature, strength, and volatility. When these components are aligned, waves are smooth; when misaligned (pre-pivot conditions), waves become chaotic.
All calculations are deterministic and execute on closed bars only—there is no repainting.
How to Use This Indicator
Setup and Configuration
Apply the indicator to your chart with default settings initially
Enable the main dashboard (top right recommended) to monitor curvature, tensor, and tension metrics in real-time
Enable the curvature matrix (bottom right) to see historical patterns in the heatmap
Choose your ribbon mode: "Dual Ribbon" shows both bullish and bearish zones, "Tension Cloud" emphasizes the compression zones
For your first session, observe how the tension cloud behaves before confirmed pivots—you'll notice it consistently tightens (narrows) before pivot markers appear, then expands after.
Signal Interpretation
High Pivot (Bearish) - Red triangle above price:
Occurs when price makes a pivot high (local maximum)
Second derivative is negative (concave down curvature)
Tensor magnitude exceeds threshold (strong confirmation)
Minimum spacing requirement met (noise filter)
Interpretation: A confirmed bearish inflection point has formed. Price trajectory has curved over and is transitioning from upward to downward movement.
Low Pivot (Bullish) - Blue triangle below price:
Occurs when price makes a pivot low (local minimum)
Second derivative is positive (concave up curvature)
Tensor magnitude exceeds threshold
Spacing requirement met
Interpretation: A confirmed bullish inflection point has formed. Price trajectory has curved upward and is transitioning from downward to upward movement.
Dashboard Metrics
κ (Curvature): 0-100% reading. Above 70% = sharp active pivot, 40-70% = moderate curve, below 40% = gentle or approaching inflection
Tensor: Directional strength. Arrow indicates bias (⬆ bullish, ⬇ bearish, ⬌ neutral). Magnitude indicates conviction.
Volatility: Current ATR expansion state. Above 70% = high volatility (pivots more significant), below 40% = compressed (pivots less reliable)
Momentum: Directional strength. High values confirm trend continuation, low values suggest exhaustion
Tension: 0-100% reading. Above 70% = pivot forming soon (high compression), below 40% = pivot recently completed (expanded)
State: Real-time regime classification:
"🟢 STABLE" = normal trending conditions
"🟡 TENSION" = pivot forming (high compression)
"🔴 HIGH κ" = active sharp pivot in progress
"⚠ INFLECTION" = geometric inflection zone (critical transition)
Curvature Matrix Heatmap
The matrix shows the last 30 bars (configurable 10-100) of historical data across five metrics:
κ row: Curvature evolution (green = low, yellow = moderate, red = high)
Tension row: Purple intensity shows compression building
Tensor row: Strength evolution (green = strong, yellow = moderate, red = weak)
Volatility row: Expansion state
Momentum row: Directional conviction
Pattern recognition: Look for purple clustering in the tension row followed by red spikes in the κ row—this shows compression → release pivot sequence.
Trading Workflow
Step 1 - Monitor Tension:
Watch the tension cloud and dashboard tension metric. When tension rises above 60-70% and the cloud visibly tightens, a pivot is building. The matrix will show purple bands clustering.
Step 2 - Identify Inflection Zone:
Wait for the golden background glow (inflection zone) to appear. This indicates the geometric conditions are met: curvature is approaching zero, second derivative is near sign change, or curvature extrema detected. The dashboard state will show "⚠ INFLECTION ZONE".
Step 3 - Confirm Direction:
Check the tensor arrow in the dashboard:
⬆ (bullish tensor) = expect bullish pivot
⬇ (bearish tensor) = expect bearish pivot
Also verify the y'' status in the dashboard:
"🔵↑ Concave Up" = bullish curvature forming
"🔴↓ Concave Down" = bearish curvature forming
Step 4 - Wait for Pivot Marker:
Do not enter on inflection zones alone—wait for the confirmed pivot marker (triangle). This ensures all confirmation layers have aligned: geometric inflection + price structure pivot + tensor strength + spacing filter.
Step 5 - Execute Entry:
Long entry: Blue triangle below price + ⬆ tensor + tension releasing (dropping)
Short entry: Red triangle above price + ⬇ tensor + tension releasing
Step 6 - Manage Risk:
Initial stop: Place beyond the opposite ribbon edge plus one ATR buffer
Trailing stop: Follow the ribbon edge (basis ± adaptive width) as curvature sustains in your direction
Exit signal: If tension spikes again quickly (another inflection forming), consider taking profit—the trend may be reversing
Best Practices
Use multiple timeframe confirmation: Check that higher timeframe tensor aligns with your trade direction
Respect the spacing filter: If a pivot just fired, wait for minimum spacing before taking another signal
Distinguish regime: In "🔴 HIGH κ" state (choppy), reduce position size; in "🟢 STABLE" state, full confidence
Combine with support/resistance: Pivots near key levels have higher probability
Watch particle density: Clustering of particles indicates rising curvature intensity
Observe wave texture: Smooth flowing waves = trending environment (pivots are reversals); chaotic erratic waves = reversal environment (pivots are trend starts)
Ideal Market Conditions
Best Performance
Liquid markets with clear swing structure (forex majors, large-cap stocks, major indices)
Timeframes from 15-minute to daily (the system adapts across timeframes)
Markets with periodic swings and clear directional phases (where geometric curvature is meaningful)
Trending markets with consolidation phases (where tension builds before breakouts)
Challenging Conditions
Extremely choppy/sideways markets for extended periods (high curvature but low tensor magnitude—system will reduce signals appropriately)
Very low liquidity instruments (erratic price action creates false geometric signals)
Ultra-low timeframes (1-minute or below) where spread and noise dominate structure
Markets in deep consolidation (the system will show high tension but no clean pivot confirmation)
The indicator is designed to adapt: in poor conditions, tensor scores remain low and signals reduce naturally. In optimal conditions, tension compression → inflection → pivot confirmation sequences occur cleanly.
Parameter Optimization by Trading Style
Scalping (5-15 Minute Charts)
Curvature Window: 3-5 (faster response)
Curvature Smoothing: 2 (minimal lag)
Volatility Length: 10-14
Momentum Length: 8-10
Tensor Gain: 1.2-1.5 (moderate sensitivity)
Inflection Threshold: 0.10-0.15 (more sensitive)
Min Pivot Spacing: 3-5 bars
Pivot Mode: Aggressive
Ribbon Mode: Dual Ribbon (clearer entries)
Day Trading (15-60 Minute Charts)
Curvature Window: 5 (default)
Curvature Smoothing: 3 (balanced)
Volatility Length: 14
Momentum Length: 10
Tensor Gain: 1.5 (default)
Inflection Threshold: 0.15 (default)
Min Pivot Spacing: 5-8 bars
Pivot Mode: Normal or Adaptive
Ribbon Mode: Dual Ribbon
Swing Trading (4-Hour to Daily Charts)
Curvature Window: 7-10 (smoother)
Curvature Smoothing: 4-5 (noise reduction)
Volatility Length: 20-30
Momentum Length: 14-20
Tensor Gain: 1.8-2.5 (higher conviction requirement)
Inflection Threshold: 0.20-0.30 (more selective)
Min Pivot Spacing: 8-12 bars
Pivot Mode: Conservative
Ribbon Mode: Tension Cloud (focus on compression zones)
Performance Optimization
If you experience lag on lower-end systems:
Reduce Wave Layers: 4 → 2 (50% reduction in calculations)
Lower Particle Density: 3 → 1 (66% reduction in label creation)
Decrease Matrix History: 30 → 15 bars (50% reduction in table size)
Disable Tensor Waves entirely if not needed for your trading
Important Disclaimers
- This indicator is a technical analysis tool designed to identify potential pivot points through mathematical analysis of price trajectory geometry. It should not be used as a standalone trading system. Always combine with proper risk management, position sizing, and additional confirmation methods (support/resistance, volume analysis, multi-timeframe alignment).
- The curvature and tensor calculations are deterministic mathematical formulas applied to historical price data—they do not predict future price movements with certainty. Past geometric patterns do not guarantee future pivot behavior. The tension-based prediction system identifies conditions where pivots are likely to form based on trajectory straightness, but market conditions can change rapidly.
- All trading involves risk. Use appropriate stop losses and never risk more than you can afford to lose. The signal spacing filters and tensor confirmation layers are designed to reduce noise, but no indicator can eliminate false signals entirely.
This system is most effective when combined with sound trading principles, market context awareness, and disciplined execution.
Technical Notes
All calculations execute on closed bars only (no repainting)
Lookback functions limited to 5000 bars maximum
Arrays are fixed-size (waves) or hard-capped (particles at 80 labels)
Dashboard and matrix update only on the last bar to minimize computational load
Particle generation throttled to every 2 bars
Phase accumulators use modulo operations to prevent overflow
Statistical normalization (mean ± 2σ) automatically adapts to different volatility regimes
— Dskyz, Trade with insight. Trade with anticipation.
Trade PullBack - EMA Pullback System with Auto Risk-Reward# Trade Pull Back - Professional Pullback Trading System
## 📊 Overview
**Trade Pull Back** is a comprehensive pullback trading system that combines trend-following principles with precise entry timing using candlestick pattern confirmation. This indicator is designed for traders who want to enter trending markets at optimal retracement levels with pre-calculated risk-reward ratios.
---
## 🎯 Core Methodology
### Why This System Works
Most traders struggle with two key challenges:
1. **Entering too early** - jumping into trades before the pullback completes
2. **Entering too late** - missing the momentum after the pullback reverses
This system solves both problems by using a **3-Phase Confirmation Process**:
**Phase 1: Trend Identification** → **Phase 2: Pullback Detection** → **Phase 3: Reversal Confirmation**
---
## 🔧 How It Works
### 1. Triple EMA Framework (The Foundation)
Unlike traditional single EMA systems, this indicator uses **3 separate EMAs** with different purposes:
- **EMA Trend (default: 50)** - Determines the overall market direction
- Source: HL/2 for balanced trend reading
- Acts as the primary filter - we only trade in its direction
- **EMA High (default: 20)** - Dynamic resistance in uptrends
- Source: High prices for accurate resistance mapping
- Entry trigger for bullish setups when price closes above it
- **EMA Low (default: 20)** - Dynamic support in downtrends
- Source: Low prices for accurate support mapping
- Entry trigger for bearish setups when price closes below it
**Why 3 EMAs?**
- Single EMA can't distinguish between trend and pullback zones
- Two EMAs (like MACD) don't provide clear entry/exit levels
- Three EMAs create a **channel system** that identifies both trend direction AND optimal entry zones
### 2. Pattern Recognition Engine
The system detects two high-probability reversal patterns:
#### Engulfing Patterns
- **Bullish Engulfing**: Previous bearish candle completely engulfed by bullish candle
- **Bearish Engulfing**: Previous bullish candle completely engulfed by bearish candle
- Validates: Strong momentum reversal with volume confirmation
#### Pin Bar Patterns
- **Bullish Pin Bar (Hammer)**: Long lower wick (60%+ of total range) rejecting lower prices
- **Bearish Pin Bar (Inverted Hammer)**: Long upper wick (60%+ of total range) rejecting higher prices
- Validates: Institutional rejection at support/resistance levels
**Pattern Quality Filter:**
- Body-to-wick ratio must meet minimum standards
- Checks previous candle momentum
- Requires trend alignment before signaling
### 3. Pullback Confirmation System
The system includes **5 mandatory conditions** before generating a signal:
#### For Bullish Signals (BUY):
1. ✅ Close > EMA Trend (uptrend confirmed)
2. ✅ EMA High > EMA Trend AND EMA Low > EMA Trend (healthy trend structure)
3. ✅ Bullish Engulfing OR Bullish Pin Bar (pattern detected)
4. ✅ Close > EMA High (breakout confirmation)
5. ✅ Optional: Low < EMA High (pullback occurred)
#### For Bearish Signals (SELL):
1. ✅ Close < EMA Trend (downtrend confirmed)
2. ✅ EMA High < EMA Trend AND EMA Low < EMA Trend (healthy trend structure)
3. ✅ Bearish Engulfing OR Bearish Pin Bar (pattern detected)
4. ✅ Close < EMA Low (breakdown confirmation)
5. ✅ Optional: High > EMA Low (pullback occurred)
**Additional Filters:**
- **Consecutive Bars Check**: Ensures pullback had momentum (1-5 bearish/bullish bars)
- **Signal Spacing**: Minimum 4 bars between signals to avoid noise
- **Confirmation Delay**: Signal appears only AFTER bar closes (no repainting)
---
## 💰 Automatic Risk-Reward Calculator
### Smart Position Sizing
When a signal triggers, the system automatically calculates:
**For Long Positions:**
- **Entry**: High of signal candle
- **Stop Loss**: Lower of last 2 candle lows (protects against false breakouts)
- **Target 1 (1R)**: Entry + 1x Risk
- **Target 2 (2R)**: Entry + 2x Risk
- **Target 3 (3R)**: Entry + 3x Risk
**For Short Positions:**
- **Entry**: Low of signal candle
- **Stop Loss**: Higher of last 2 candle highs
- **Targets**: Calculated based on risk multiple
### Auto-Remove Feature
Lines and labels automatically disappear when:
- Price hits Stop Loss (trade invalidated)
- Price reaches 3R target (trade complete)
This keeps your chart clean and focuses only on active trades.
---
## 📈 Multi-Timeframe Trend Analysis
### Confluence Trading
The built-in MTF trend box shows trend status across 7 timeframes simultaneously:
- M1, M5, M15, M30, H1, H4, D1
**Color Coding:**
- 🟢 **Green**: Uptrend (Price > EMA Trend AND EMAs aligned bullish)
- 🔴 **Red**: Downtrend (Price < EMA Trend AND EMAs aligned bearish)
- ⚪ **Gray**: No clear trend
**Why This Matters:**
- Trade with higher timeframe trends for better win rate
- Avoid counter-trend trades when all timeframes show same direction
- Identify divergences between timeframes for reversal opportunities
---
## 🎨 Customization Options
### EMA Settings
- Adjust periods for different trading styles (scalping vs swing trading)
- Choose price sources (HL/2, Close, HLC/3) for sensitivity tuning
### Pattern Selection
- Enable/disable Engulfing patterns
- Enable/disable Pin Bar patterns
- Trade only your preferred pattern type
### Signal Filters
- **Require Pullback**: Force pullback condition (stricter entries)
- **Consecutive Bars**: Set momentum requirement (1-5 bars)
### Display Options
- Show/hide EMA lines
- Show/hide signals
- Enable/disable alerts
- Customize Risk-Reward line styles and extensions
---
## 📋 How to Use This Indicator
### Step 1: Identify the Trend
- Wait for price to establish clear direction relative to EMA Trend (50)
- Check MTF box to confirm higher timeframe alignment
### Step 2: Wait for Pullback
- In uptrend: Watch for price to pull back toward EMA High
- In downtrend: Watch for price to pull back toward EMA Low
### Step 3: Pattern Confirmation
- Look for Engulfing or Pin Bar pattern (triangle/diamond markers)
- Ensure pattern forms at or near the EMA High/Low zone
### Step 4: Entry & Risk Management
- Enter when signal appears (after bar closes)
- Use displayed Stop Loss and Take Profit levels
- Consider partial profits at 1R and 2R, let remainder run to 3R
### Step 5: Trade Management
- If price hits SL, lines disappear automatically (trade invalidated)
- If price reaches 3R, lines disappear (trade complete)
- Consider trailing stop after 1R is reached
---
## ⚙️ Recommended Settings
### For Scalping (M1-M5)
- EMA Trend: 20-30
- EMA High/Low: 10-15
- Require Pullback: OFF
- Consecutive Bars: 1
### For Day Trading (M15-H1)
- EMA Trend: 50 (default)
- EMA High/Low: 20 (default)
- Require Pullback: ON
- Consecutive Bars: 2-3
### For Swing Trading (H4-D1)
- EMA Trend: 100-200
- EMA High/Low: 50
- Require Pullback: ON
- Consecutive Bars: 3-5
---
## ✅ What Makes This Script Original
### 1. Systematic Approach
This isn't just a collection of indicators. It's a **complete trading system** with:
- Defined entry rules (5-point confirmation checklist)
- Automatic risk management (SL/TP calculation)
- Trade validation (consecutive bars, signal spacing)
### 2. Smart EMA Framework
The 3-EMA system creates a **dynamic channel** that adapts to market conditions:
- Trend EMA = Direction filter
- High/Low EMAs = Entry/Exit zones
- Together they form a "trade zone" that standard EMAs can't provide
### 3. Pattern Quality Control
Not all Engulfing or Pin Bar patterns are equal. This system:
- Validates body-to-wick ratios
- Checks previous candle momentum
- Requires trend alignment before signaling
### 4. Auto Risk-Reward Management
Most indicators just show signals. This one:
- Calculates exact entry prices
- Places stop loss at optimal location (lower of 2 lows)
- Projects 3 profit targets based on risk
- Auto-removes when trade is complete/invalidated
### 5. No Repainting
- All signals appear AFTER bar closes
- No future data leaking
- What you see in backtest = what you get in real-time
---
## 🚨 Alerts
Built-in alerts notify you when:
- Bullish signal confirmed
- Bearish signal confirmed
Alerts fire once per bar (no spam) and only after bar closes (no false alerts).
---
## 📊 Best Practices
### ✅ DO:
- Trade in direction of higher timeframe trends
- Wait for full confirmation (all 5 conditions met)
- Use proper position sizing (1-2% risk per trade)
- Let winners run to at least 2R
### ❌ DON'T:
- Trade against major trend on MTF box
- Enter before signal bar closes
- Ignore the Stop Loss level
- Overtrade - respect the 4-bar minimum spacing
---
## 🔍 Limitations
This indicator is a **tool**, not a crystal ball:
- No indicator wins 100% of the time
- False signals occur in choppy/ranging markets
- Best results in trending conditions
- Requires proper risk management
- Should be combined with fundamental analysis and market context
---
## 📚 Educational Value
This script teaches:
- How to combine trend following with mean reversion
- Pattern recognition and validation
- Risk-reward ratio calculation
- Multi-timeframe analysis
- Proper trade entry timing
---
## 🎓 Credits & Disclaimer
**Original Work**: All code written from scratch
**Methodology**: Based on classical technical analysis principles (EMA crossovers, candlestick patterns, support/resistance)
**Disclaimer**: This indicator is for educational purposes. Past performance does not guarantee future results. Always practice proper risk management.
---
## 📞 Support
If you find this indicator helpful:
- Leave a review
- Share with fellow traders
- Provide feedback for improvements
**Note**: This is a closed-source script to protect the proprietary signal logic and filtering algorithms. The description above provides comprehensive understanding of the methodology without revealing exact implementation details.
---
**Version**: 1.0
**Pine Script Version**: 5
**Type**: Indicator (Overlay)
**Category**: Trend Following + Pattern Recognition
---
*Happy Trading! 🚀*
# 🇹🇭 คู่มือภาษาไทย / Thai Guide
# Trade Pull Back - คู่มือภาษาไทย
## 📊 ภาพรวม
**Trade Pull Back** เป็นระบบเทรด Pullback ที่ผสมผสานการเทรดตามเทรนด์กับการจับจังหวะเข้าออเดอร์ด้วย Candlestick Pattern พร้อมคำนวณ Risk-Reward อัตโนมัติ
---
## 🎯 หลักการทำงาน
### ทำไมระบบนี้ได้ผล?
แก้ปัญหา 2 ข้อหลักของเทรดเดอร์:
1. **เข้าเร็วเกินไป** - เข้าก่อน Pullback เสร็จ
2. **เข้าช้าเกินไป** - พลาดโมเมนตัมหลังกลับตัว
**วิธีแก้**: ใช้กระบวนการยืนยัน 3 ขั้นตอน
- **ขั้น 1**: ระบุเทรนด์ → **ขั้น 2**: ตรวจจับ Pullback → **ขั้น 3**: ยืนยันการกลับตัว
---
## 🔧 ส่วนประกอบหลัก
### 1. ระบบ EMA 3 เส้น
ต่างจาก EMA ทั่วไป ระบบนี้ใช้ 3 เส้นที่มีหน้าที่แยกกัน:
- **EMA Trend (50)** - กำหนดทิศทางเทรนด์หลัก
- **EMA High (20)** - แนวต้านไดนามิก (สำหรับ Buy)
- **EMA Low (20)** - แนวรับไดนามิก (สำหรับ Sell)
**ทำไมต้อง 3 เส้น?**
- 1 เส้น = แยกเทรนด์กับ Pullback ไม่ได้
- 2 เส้น = ไม่มีจุด Entry/Exit ชัดเจน
- 3 เส้น = สร้าง Channel ที่บอกทั้งเทรนด์และโซนเข้าออเดอร์
### 2. ตรวจจับ Pattern
ระบบตรวจจับ 2 Pattern หลัก:
**Engulfing (แท่งกลืน)**
- Bullish: แท่งเขียวกลืนแท่งแดงทั้งหมด
- Bearish: แท่งแดงกลืนแท่งเขียวทั้งหมด
**Pin Bar (แท่งหาง)**
- Bullish: หางล่างยาว 60%+ ของช่วงทั้งหมด
- Bearish: หางบนยาว 60%+ ของช่วงทั้งหมด
### 3. เงื่อนไขยืนยันสัญญาณ (5 ข้อ)
**สัญญาณ Buy:**
1. ✅ ราคาปิด > EMA Trend (เทรนด์ขาขึ้น)
2. ✅ EMA High และ Low เหนือ EMA Trend (โครงสร้างดี)
3. ✅ เกิด Bullish Engulfing หรือ Pin Bar
4. ✅ ราคาปิด > EMA High (ยืนยัน Breakout)
5. ✅ ตัวเลือก: มี Pullback มาแตะ EMA High
**สัญญาณ Sell:**
1. ✅ ราคาปิด < EMA Trend (เทรนด์ขาลง)
2. ✅ EMA High และ Low ใต้ EMA Trend (โครงสร้างดี)
3. ✅ เกิด Bearish Engulfing หรือ Pin Bar
4. ✅ ราคาปิด < EMA Low (ยืนยัน Breakdown)
5. ✅ ตัวเลือก: มี Pullback มาแตะ EMA Low
**ตัวกรองเพิ่มเติม:**
- ต้องมีแท่งติดกัน 1-5 แท่ง (กำหนดได้)
- ห่างสัญญาณก่อนหน้าอย่างน้อย 4 แท่ง
- สัญญาณปรากฏหลังแท่งปิดเท่านั้น (ไม่ Repaint)
---
## 💰 คำนวณ Risk-Reward อัตโนมัติ
เมื่อสัญญาณเกิด ระบบคำนวณให้อัตโนมัติ:
**Long Position:**
- Entry = High ของแท่งสัญญาณ
- Stop Loss = Low ที่ต่ำกว่าของ 2 แท่งล่าสุด
- Target = 1R, 2R, 3R
**Short Position:**
- Entry = Low ของแท่งสัญญาณ
- Stop Loss = High ที่สูงกว่าของ 2 แท่งล่าสุด
- Target = 1R, 2R, 3R
**ลบอัตโนมัติ:** เส้นหายเมื่อราคาชน SL หรือถึง 3R
---
## 📈 กล่องเทรนด์หลาย Timeframe
แสดงเทรนด์พร้อมกัน 7 Timeframe:
- M1, M5, M15, M30, H1, H4, D1
**สีแสดงผล:**
- 🟢 เขียว = Uptrend
- 🔴 แดง = Downtrend
- ⚪ เทา = ไม่มีเทรนด์
**ประโยชน์:** เทรดตาม Timeframe ใหญ่เพื่อเพิ่ม Win Rate
---
## 📋 วิธีใช้งาน (5 ขั้นตอน)
1. **ระบุเทรนด์** - เช็คราคาเทียบกับ EMA Trend และกล่อง MTF
2. **รอ Pullback** - เฝ้าราคา Pullback มาที่ EMA High/Low
3. **เช็ค Pattern** - มองหาลูกศรสามเหลี่ยม (Engulfing) หรือเพชร (Pin Bar)
4. **เข้าออเดอร์** - เข้าเมื่อสัญญาณปรากฏ ใช้ SL/TP ที่แสดง
5. **จัดการเทรด** - เส้นจะหายเองเมื่อชน SL หรือถึง 3R
---
## ⚙️ การตั้งค่าแนะนำ
**Scalping (M1-M5)**
- EMA Trend: 20-30
- EMA High/Low: 10-15
- Require Pullback: ปิด
**Day Trading (M15-H1)**
- EMA Trend: 50 (ค่าเริ่มต้น)
- EMA High/Low: 20 (ค่าเริ่มต้น)
- Require Pullback: เปิด
**Swing Trading (H4-D1)**
- EMA Trend: 100-200
- EMA High/Low: 50
- Require Pullback: เปิด
---
## ✅ จุดเด่นที่แตกต่าง
1. **เป็นระบบสมบูรณ์** - ไม่ใช่แค่รวม Indicator
2. **EMA 3 เส้นสร้าง Channel** - บอกทั้งเทรนด์และโซนเข้า
3. **ตรวจสอบคุณภาพ Pattern** - ไม่ใช่ทุก Pattern ที่ให้สัญญาณ
4. **คำนวณ RR อัตโนมัติ** - วาง SL/TP ให้เลย
5. **ไม่ Repaint** - สัญญาณปรากฏหลังแท่งปิดเท่านั้น
---
## 📊 ควรทำ / ไม่ควรทำ
### ✅ ควรทำ:
- เทรดตามเทรนด์ Timeframe ใหญ่
- รอยืนยันครบ 5 เงื่อนไข
- เสี่ยง 1-2% ต่อเทรด
- ปล่อยกำไรไปอย่างน้อย 2R
### ❌ ไม่ควรทำ:
- เทรดทวนเทรนด์ในกล่อง MTF
- เข้าก่อนแท่งปิด
- ละเลย Stop Loss
- เทรดบ่อยเกินไป
---
## 🔍 ข้อจำกัด
- ไม่มี Indicator ไหนชนะ 100%
- สัญญาณผิดพลาดเกิดในตลาด Sideways
- ผลดีสุดในตลาดที่มีเทรนด์ชัด
- ต้องใช้ Money Management
- ควรดูปัจจัยพื้นฐานประกอบ
---
## 🎓 คำเตือน
**Disclaimer**: อินดิเคเตอร์นี้สำหรับการศึกษา ผลในอดีตไม่รับประกันอนาคต ใช้ Risk Management ที่เหมาะสมเสมอ
---
**เวอร์ชั่น**: 1.0
**Pine Script**: v5
**ประเภท**: Indicator (Overlay)
*Happy Trading! 🚀*
## Screenshots
**Bearish Signals with Risk-Reward:**
! (drive.google.com)
**Bullish Signal with Risk-Reward:**
! (drive.google.com)
**Multi-Timeframe Trend Box:**
! (drive.google.com)
**Settings Panel:**
! (drive.google.com)
ATAI Volume analysis with price action V 1.00ATAI Volume Analysis with Price Action
1. Introduction
1.1 Overview
ATAI Volume Analysis with Price Action is a composite indicator designed for TradingView. It combines per‑side volume data —that is, how much buying and selling occurs during each bar—with standard price‑structure elements such as swings, trend lines and support/resistance. By blending these elements the script aims to help a trader understand which side is in control, whether a breakout is genuine, when markets are potentially exhausted and where liquidity providers might be active.
The indicator is built around TradingView’s up/down volume feed accessed via the TradingView/ta/10 library. The following excerpt from the script illustrates how this feed is configured:
import TradingView/ta/10 as tvta
// Determine lower timeframe string based on user choice and chart resolution
string lower_tf_breakout = use_custom_tf_input ? custom_tf_input :
timeframe.isseconds ? "1S" :
timeframe.isintraday ? "1" :
timeframe.isdaily ? "5" : "60"
// Request up/down volume (both positive)
= tvta.requestUpAndDownVolume(lower_tf_breakout)
Lower‑timeframe selection. If you do not specify a custom lower timeframe, the script chooses a default based on your chart resolution: 1 second for second charts, 1 minute for intraday charts, 5 minutes for daily charts and 60 minutes for anything longer. Smaller intervals provide a more precise view of buyer and seller flow but cover fewer bars. Larger intervals cover more history at the cost of granularity.
Tick vs. time bars. Many trading platforms offer a tick / intrabar calculation mode that updates an indicator on every trade rather than only on bar close. Turning on one‑tick calculation will give the most accurate split between buy and sell volume on the current bar, but it typically reduces the amount of historical data available. For the highest fidelity in live trading you can enable this mode; for studying longer histories you might prefer to disable it. When volume data is completely unavailable (some instruments and crypto pairs), all modules that rely on it will remain silent and only the price‑structure backbone will operate.
Figure caption, Each panel shows the indicator’s info table for a different volume sampling interval. In the left chart, the parentheses “(5)” beside the buy‑volume figure denote that the script is aggregating volume over five‑minute bars; the center chart uses “(1)” for one‑minute bars; and the right chart uses “(1T)” for a one‑tick interval. These notations tell you which lower timeframe is driving the volume calculations. Shorter intervals such as 1 minute or 1 tick provide finer detail on buyer and seller flow, but they cover fewer bars; longer intervals like five‑minute bars smooth the data and give more history.
Figure caption, The values in parentheses inside the info table come directly from the Breakout — Settings. The first row shows the custom lower-timeframe used for volume calculations (e.g., “(1)”, “(5)”, or “(1T)”)
2. Price‑Structure Backbone
Even without volume, the indicator draws structural features that underpin all other modules. These features are always on and serve as the reference levels for subsequent calculations.
2.1 What it draws
• Pivots: Swing highs and lows are detected using the pivot_left_input and pivot_right_input settings. A pivot high is identified when the high recorded pivot_right_input bars ago exceeds the highs of the preceding pivot_left_input bars and is also higher than (or equal to) the highs of the subsequent pivot_right_input bars; pivot lows follow the inverse logic. The indicator retains only a fixed number of such pivot points per side, as defined by point_count_input, discarding the oldest ones when the limit is exceeded.
• Trend lines: For each side, the indicator connects the earliest stored pivot and the most recent pivot (oldest high to newest high, and oldest low to newest low). When a new pivot is added or an old one drops out of the lookback window, the line’s endpoints—and therefore its slope—are recalculated accordingly.
• Horizontal support/resistance: The highest high and lowest low within the lookback window defined by length_input are plotted as horizontal dashed lines. These serve as short‑term support and resistance levels.
• Ranked labels: If showPivotLabels is enabled the indicator prints labels such as “HH1”, “HH2”, “LL1” and “LL2” near each pivot. The ranking is determined by comparing the price of each stored pivot: HH1 is the highest high, HH2 is the second highest, and so on; LL1 is the lowest low, LL2 is the second lowest. In the case of equal prices the newer pivot gets the better rank. Labels are offset from price using ½ × ATR × label_atr_multiplier, with the ATR length defined by label_atr_len_input. A dotted connector links each label to the candle’s wick.
2.2 Key settings
• length_input: Window length for finding the highest and lowest values and for determining trend line endpoints. A larger value considers more history and will generate longer trend lines and S/R levels.
• pivot_left_input, pivot_right_input: Strictness of swing confirmation. Higher values require more bars on either side to form a pivot; lower values create more pivots but may include minor swings.
• point_count_input: How many pivots are kept in memory on each side. When new pivots exceed this number the oldest ones are discarded.
• label_atr_len_input and label_atr_multiplier: Determine how far pivot labels are offset from the bar using ATR. Increasing the multiplier moves labels further away from price.
• Styling inputs for trend lines, horizontal lines and labels (color, width and line style).
Figure caption, The chart illustrates how the indicator’s price‑structure backbone operates. In this daily example, the script scans for bars where the high (or low) pivot_right_input bars back is higher (or lower) than the preceding pivot_left_input bars and higher or lower than the subsequent pivot_right_input bars; only those bars are marked as pivots.
These pivot points are stored and ranked: the highest high is labelled “HH1”, the second‑highest “HH2”, and so on, while lows are marked “LL1”, “LL2”, etc. Each label is offset from the price by half of an ATR‑based distance to keep the chart clear, and a dotted connector links the label to the actual candle.
The red diagonal line connects the earliest and latest stored high pivots, and the green line does the same for low pivots; when a new pivot is added or an old one drops out of the lookback window, the end‑points and slopes adjust accordingly. Dashed horizontal lines mark the highest high and lowest low within the current lookback window, providing visual support and resistance levels. Together, these elements form the structural backbone that other modules reference, even when volume data is unavailable.
3. Breakout Module
3.1 Concept
This module confirms that a price break beyond a recent high or low is supported by a genuine shift in buying or selling pressure. It requires price to clear the highest high (“HH1”) or lowest low (“LL1”) and, simultaneously, that the winning side shows a significant volume spike, dominance and ranking. Only when all volume and price conditions pass is a breakout labelled.
3.2 Inputs
• lookback_break_input : This controls the number of bars used to compute moving averages and percentiles for volume. A larger value smooths the averages and percentiles but makes the indicator respond more slowly.
• vol_mult_input : The “spike” multiplier; the current buy or sell volume must be at least this multiple of its moving average over the lookback window to qualify as a breakout.
• rank_threshold_input (0–100) : Defines a volume percentile cutoff: the current buyer/seller volume must be in the top (100−threshold)%(100−threshold)% of all volumes within the lookback window. For example, if set to 80, the current volume must be in the top 20 % of the lookback distribution.
• ratio_threshold_input (0–1) : Specifies the minimum share of total volume that the buyer (for a bullish breakout) or seller (for bearish) must hold on the current bar; the code also requires that the cumulative buyer volume over the lookback window exceeds the seller volume (and vice versa for bearish cases).
• use_custom_tf_input / custom_tf_input : When enabled, these inputs override the automatic choice of lower timeframe for up/down volume; otherwise the script selects a sensible default based on the chart’s timeframe.
• Label appearance settings : Separate options control the ATR-based offset length, offset multiplier, label size and colors for bullish and bearish breakout labels, as well as the connector style and width.
3.3 Detection logic
1. Data preparation : Retrieve per‑side volume from the lower timeframe and take absolute values. Build rolling arrays of the last lookback_break_input values to compute simple moving averages (SMAs), cumulative sums and percentile ranks for buy and sell volume.
2. Volume spike: A spike is flagged when the current buy (or, in the bearish case, sell) volume is at least vol_mult_input times its SMA over the lookback window.
3. Dominance test: The buyer’s (or seller’s) share of total volume on the current bar must meet or exceed ratio_threshold_input. In addition, the cumulative sum of buyer volume over the window must exceed the cumulative sum of seller volume for a bullish breakout (and vice versa for bearish). A separate requirement checks the sign of delta: for bullish breakouts delta_breakout must be non‑negative; for bearish breakouts it must be non‑positive.
4. Percentile rank: The current volume must fall within the top (100 – rank_threshold_input) percent of the lookback distribution—ensuring that the spike is unusually large relative to recent history.
5. Price test: For a bullish signal, the closing price must close above the highest pivot (HH1); for a bearish signal, the close must be below the lowest pivot (LL1).
6. Labeling: When all conditions above are satisfied, the indicator prints “Breakout ↑” above the bar (bullish) or “Breakout ↓” below the bar (bearish). Labels are offset using half of an ATR‑based distance and linked to the candle with a dotted connector.
Figure caption, (Breakout ↑ example) , On this daily chart, price pushes above the red trendline and the highest prior pivot (HH1). The indicator recognizes this as a valid breakout because the buyer‑side volume on the lower timeframe spikes above its recent moving average and buyers dominate the volume statistics over the lookback period; when combined with a close above HH1, this satisfies the breakout conditions. The “Breakout ↑” label appears above the candle, and the info table highlights that up‑volume is elevated relative to its 11‑bar average, buyer share exceeds the dominance threshold and money‑flow metrics support the move.
Figure caption, In this daily example, price breaks below the lowest pivot (LL1) and the lower green trendline. The indicator identifies this as a bearish breakout because sell‑side volume is sharply elevated—about twice its 11‑bar average—and sellers dominate both the bar and the lookback window. With the close falling below LL1, the script triggers a Breakout ↓ label and marks the corresponding row in the info table, which shows strong down volume, negative delta and a seller share comfortably above the dominance threshold.
4. Market Phase Module (Volume Only)
4.1 Concept
Not all markets trend; many cycle between periods of accumulation (buying pressure building up), distribution (selling pressure dominating) and neutral behavior. This module classifies the current bar into one of these phases without using ATR , relying solely on buyer and seller volume statistics. It looks at net flows, ratio changes and an OBV‑like cumulative line with dual‑reference (1‑ and 2‑bar) trends. The result is displayed both as on‑chart labels and in a dedicated row of the info table.
4.2 Inputs
• phase_period_len: Number of bars over which to compute sums and ratios for phase detection.
• phase_ratio_thresh : Minimum buyer share (for accumulation) or minimum seller share (for distribution, derived as 1 − phase_ratio_thresh) of the total volume.
• strict_mode: When enabled, both the 1‑bar and 2‑bar changes in each statistic must agree on the direction (strict confirmation); when disabled, only one of the two references needs to agree (looser confirmation).
• Color customisation for info table cells and label styling for accumulation and distribution phases, including ATR length, multiplier, label size, colors and connector styles.
• show_phase_module: Toggles the entire phase detection subsystem.
• show_phase_labels: Controls whether on‑chart labels are drawn when accumulation or distribution is detected.
4.3 Detection logic
The module computes three families of statistics over the volume window defined by phase_period_len:
1. Net sum (buyers minus sellers): net_sum_phase = Σ(buy) − Σ(sell). A positive value indicates a predominance of buyers. The code also computes the differences between the current value and the values 1 and 2 bars ago (d_net_1, d_net_2) to derive up/down trends.
2. Buyer ratio: The instantaneous ratio TF_buy_breakout / TF_tot_breakout and the window ratio Σ(buy) / Σ(total). The current ratio must exceed phase_ratio_thresh for accumulation or fall below 1 − phase_ratio_thresh for distribution. The first and second differences of the window ratio (d_ratio_1, d_ratio_2) determine trend direction.
3. OBV‑like cumulative net flow: An on‑balance volume analogue obv_net_phase increments by TF_buy_breakout − TF_sell_breakout each bar. Its differences over the last 1 and 2 bars (d_obv_1, d_obv_2) provide trend clues.
The algorithm then combines these signals:
• For strict mode , accumulation requires: (a) current ratio ≥ threshold, (b) cumulative ratio ≥ threshold, (c) both ratio differences ≥ 0, (d) net sum differences ≥ 0, and (e) OBV differences ≥ 0. Distribution is the mirror case.
• For loose mode , it relaxes the directional tests: either the 1‑ or the 2‑bar difference needs to agree in each category.
If all conditions for accumulation are satisfied, the phase is labelled “Accumulation” ; if all conditions for distribution are satisfied, it’s labelled “Distribution” ; otherwise the phase is “Neutral” .
4.4 Outputs
• Info table row : Row 8 displays “Market Phase (Vol)” on the left and the detected phase (Accumulation, Distribution or Neutral) on the right. The text colour of both cells matches a user‑selectable palette (typically green for accumulation, red for distribution and grey for neutral).
• On‑chart labels : When show_phase_labels is enabled and a phase persists for at least one bar, the module prints a label above the bar ( “Accum” ) or below the bar ( “Dist” ) with a dashed or dotted connector. The label is offset using ATR based on phase_label_atr_len_input and phase_label_multiplier and is styled according to user preferences.
Figure caption, The chart displays a red “Dist” label above a particular bar, indicating that the accumulation/distribution module identified a distribution phase at that point. The detection is based on seller dominance: during that bar, the net buyer-minus-seller flow and the OBV‑style cumulative flow were trending down, and the buyer ratio had dropped below the preset threshold. These conditions satisfy the distribution criteria in strict mode. The label is placed above the bar using an ATR‑based offset and a dashed connector. By the time of the current bar in the screenshot, the phase indicator shows “Neutral” in the info table—signaling that neither accumulation nor distribution conditions are currently met—yet the historical “Dist” label remains to mark where the prior distribution phase began.
Figure caption, In this example the market phase module has signaled an Accumulation phase. Three bars before the current candle, the algorithm detected a shift toward buyers: up‑volume exceeded its moving average, down‑volume was below average, and the buyer share of total volume climbed above the threshold while the on‑balance net flow and cumulative ratios were trending upwards. The blue “Accum” label anchored below that bar marks the start of the phase; it remains on the chart because successive bars continue to satisfy the accumulation conditions. The info table confirms this: the “Market Phase (Vol)” row still reads Accumulation, and the ratio and sum rows show buyers dominating both on the current bar and across the lookback window.
5. OB/OS Spike Module
5.1 What overbought/oversold means here
In many markets, a rapid extension up or down is often followed by a period of consolidation or reversal. The indicator interprets overbought (OB) conditions as abnormally strong selling risk at or after a price rally and oversold (OS) conditions as unusually strong buying risk after a decline. Importantly, these are not direct trade signals; rather they flag areas where caution or contrarian setups may be appropriate.
5.2 Inputs
• minHits_obos (1–7): Minimum number of oscillators that must agree on an overbought or oversold condition for a label to print.
• syncWin_obos: Length of a small sliding window over which oscillator votes are smoothed by taking the maximum count observed. This helps filter out choppy signals.
• Volume spike criteria: kVolRatio_obos (ratio of current volume to its SMA) and zVolThr_obos (Z‑score threshold) across volLen_obos. Either threshold can trigger a spike.
• Oscillator toggles and periods: Each of RSI, Stochastic (K and D), Williams %R, CCI, MFI, DeMarker and Stochastic RSI can be independently enabled; their periods are adjustable.
• Label appearance: ATR‑based offset, size, colors for OB and OS labels, plus connector style and width.
5.3 Detection logic
1. Directional volume spikes: Volume spikes are computed separately for buyer and seller volumes. A sell volume spike (sellVolSpike) flags a potential OverBought bar, while a buy volume spike (buyVolSpike) flags a potential OverSold bar. A spike occurs when the respective volume exceeds kVolRatio_obos times its simple moving average over the window or when its Z‑score exceeds zVolThr_obos.
2. Oscillator votes: For each enabled oscillator, calculate its overbought and oversold state using standard thresholds (e.g., RSI ≥ 70 for OB and ≤ 30 for OS; Stochastic %K/%D ≥ 80 for OB and ≤ 20 for OS; etc.). Count how many oscillators vote for OB and how many vote for OS.
3. Minimum hits: Apply the smoothing window syncWin_obos to the vote counts using a maximum‑of‑last‑N approach. A candidate bar is only considered if the smoothed OB hit count ≥ minHits_obos (for OverBought) or the smoothed OS hit count ≥ minHits_obos (for OverSold).
4. Tie‑breaking: If both OverBought and OverSold spike conditions are present on the same bar, compare the smoothed hit counts: the side with the higher count is selected; ties default to OverBought.
5. Label printing: When conditions are met, the bar is labelled as “OverBought X/7” above the candle or “OverSold X/7” below it. “X” is the number of oscillators confirming, and the bracket lists the abbreviations of contributing oscillators. Labels are offset from price using half of an ATR‑scaled distance and can optionally include a dotted or dashed connector line.
Figure caption, In this chart the overbought/oversold module has flagged an OverSold signal. A sell‑off from the prior highs brought price down to the lower trend‑line, where the bar marked “OverSold 3/7 DeM” appears. This label indicates that on that bar the module detected a buy‑side volume spike and that at least three of the seven enabled oscillators—in this case including the DeMarker—were in oversold territory. The label is printed below the candle with a dotted connector, signaling that the market may be temporarily exhausted on the downside. After this oversold print, price begins to rebound towards the upper red trend‑line and higher pivot levels.
Figure caption, This example shows the overbought/oversold module in action. In the left‑hand panel you can see the OB/OS settings where each oscillator (RSI, Stochastic, Williams %R, CCI, MFI, DeMarker and Stochastic RSI) can be enabled or disabled, and the ATR length and label offset multiplier adjusted. On the chart itself, price has pushed up to the descending red trendline and triggered an “OverBought 3/7” label. That means the sell‑side volume spiked relative to its average and three out of the seven enabled oscillators were in overbought territory. The label is offset above the candle by half of an ATR and connected with a dashed line, signaling that upside momentum may be overextended and a pause or pullback could follow.
6. Buyer/Seller Trap Module
6.1 Concept
A bull trap occurs when price appears to break above resistance, attracting buyers, but fails to sustain the move and quickly reverses, leaving a long upper wick and trapping late entrants. A bear trap is the opposite: price breaks below support, lures in sellers, then snaps back, leaving a long lower wick and trapping shorts. This module detects such traps by looking for price structure sweeps, order‑flow mismatches and dominance reversals. It uses a scoring system to differentiate risk from confirmed traps.
6.2 Inputs
• trap_lookback_len: Window length used to rank extremes and detect sweeps.
• trap_wick_threshold: Minimum proportion of a bar’s range that must be wick (upper for bull traps, lower for bear traps) to qualify as a sweep.
• trap_score_risk: Minimum aggregated score required to flag a trap risk. (The code defines a trap_score_confirm input, but confirmation is actually based on price reversal rather than a separate score threshold.)
• trap_confirm_bars: Maximum number of bars allowed for price to reverse and confirm the trap. If price does not reverse in this window, the risk label will expire or remain unconfirmed.
• Label settings: ATR length and multiplier for offsetting, size, colours for risk and confirmed labels, and connector style and width. Separate settings exist for bull and bear traps.
• Toggle inputs: show_trap_module and show_trap_labels enable the module and control whether labels are drawn on the chart.
6.3 Scoring logic
The module assigns points to several conditions and sums them to determine whether a trap risk is present. For bull traps, the score is built from the following (bear traps mirror the logic with highs and lows swapped):
1. Sweep (2 points): Price trades above the high pivot (HH1) but fails to close above it and leaves a long upper wick at least trap_wick_threshold × range. For bear traps, price dips below the low pivot (LL1), fails to close below and leaves a long lower wick.
2. Close break (1 point): Price closes beyond HH1 or LL1 without leaving a long wick.
3. Candle/delta mismatch (2 points): The candle closes bullish yet the order flow delta is negative or the seller ratio exceeds 50%, indicating hidden supply. Conversely, a bearish close with positive delta or buyer dominance suggests hidden demand.
4. Dominance inversion (2 points): The current bar’s buyer volume has the highest rank in the lookback window while cumulative sums favor sellers, or vice versa.
5. Low‑volume break (1 point): Price crosses the pivot but total volume is below its moving average.
The total score for each side is compared to trap_score_risk. If the score is high enough, a “Bull Trap Risk” or “Bear Trap Risk” label is drawn, offset from the candle by half of an ATR‑scaled distance using a dashed outline. If, within trap_confirm_bars, price reverses beyond the opposite level—drops back below the high pivot for bull traps or rises above the low pivot for bear traps—the label is upgraded to a solid “Bull Trap” or “Bear Trap” . In this version of the code, there is no separate score threshold for confirmation: the variable trap_score_confirm is unused; confirmation depends solely on a successful price reversal within the specified number of bars.
Figure caption, In this example the trap module has flagged a Bear Trap Risk. Price initially breaks below the most recent low pivot (LL1), but the bar closes back above that level and leaves a long lower wick, suggesting a failed push lower. Combined with a mismatch between the candle direction and the order flow (buyers regain control) and a reversal in volume dominance, the aggregate score exceeds the risk threshold, so a dashed “Bear Trap Risk” label prints beneath the bar. The green and red trend lines mark the current low and high pivot trajectories, while the horizontal dashed lines show the highest and lowest values in the lookback window. If, within the next few bars, price closes decisively above the support, the risk label would upgrade to a solid “Bear Trap” label.
Figure caption, In this example the trap module has identified both ends of a price range. Near the highs, price briefly pushes above the descending red trendline and the recent pivot high, but fails to close there and leaves a noticeable upper wick. That combination of a sweep above resistance and order‑flow mismatch generates a Bull Trap Risk label with a dashed outline, warning that the upside break may not hold. At the opposite extreme, price later dips below the green trendline and the labelled low pivot, then quickly snaps back and closes higher. The long lower wick and subsequent price reversal upgrade the previous bear‑trap risk into a confirmed Bear Trap (solid label), indicating that sellers were caught on a false breakdown. Horizontal dashed lines mark the highest high and lowest low of the lookback window, while the red and green diagonals connect the earliest and latest pivot highs and lows to visualize the range.
7. Sharp Move Module
7.1 Concept
Markets sometimes display absorption or climax behavior—periods when one side steadily gains the upper hand before price breaks out with a sharp move. This module evaluates several order‑flow and volume conditions to anticipate such moves. Users can choose how many conditions must be met to flag a risk and how many (plus a price break) are required for confirmation.
7.2 Inputs
• sharp Lookback: Number of bars in the window used to compute moving averages, sums, percentile ranks and reference levels.
• sharpPercentile: Minimum percentile rank for the current side’s volume; the current buy (or sell) volume must be greater than or equal to this percentile of historical volumes over the lookback window.
• sharpVolMult: Multiplier used in the volume climax check. The current side’s volume must exceed this multiple of its average to count as a climax.
• sharpRatioThr: Minimum dominance ratio (current side’s volume relative to the opposite side) used in both the instant and cumulative dominance checks.
• sharpChurnThr: Maximum ratio of a bar’s range to its ATR for absorption/churn detection; lower values indicate more absorption (large volume in a small range).
• sharpScoreRisk: Minimum number of conditions that must be true to print a risk label.
• sharpScoreConfirm: Minimum number of conditions plus a price break required for confirmation.
• sharpCvdThr: Threshold for cumulative delta divergence versus price change (positive for bullish accumulation, negative for bearish distribution).
• Label settings: ATR length (sharpATRlen) and multiplier (sharpLabelMult) for positioning labels, label size, colors and connector styles for bullish and bearish sharp moves.
• Toggles: enableSharp activates the module; show_sharp_labels controls whether labels are drawn.
7.3 Conditions (six per side)
For each side, the indicator computes six boolean conditions and sums them to form a score:
1. Dominance (instant and cumulative):
– Instant dominance: current buy volume ≥ sharpRatioThr × current sell volume.
– Cumulative dominance: sum of buy volumes over the window ≥ sharpRatioThr × sum of sell volumes (and vice versa for bearish checks).
2. Accumulation/Distribution divergence: Over the lookback window, cumulative delta rises by at least sharpCvdThr while price fails to rise (bullish), or cumulative delta falls by at least sharpCvdThr while price fails to fall (bearish).
3. Volume climax: The current side’s volume is ≥ sharpVolMult × its average and the product of volume and bar range is the highest in the lookback window.
4. Absorption/Churn: The current side’s volume divided by the bar’s range equals the highest value in the window and the bar’s range divided by ATR ≤ sharpChurnThr (indicating large volume within a small range).
5. Percentile rank: The current side’s volume percentile rank is ≥ sharp Percentile.
6. Mirror logic for sellers: The above checks are repeated with buyer and seller roles swapped and the price break levels reversed.
Each condition that passes contributes one point to the corresponding side’s score (0 or 1). Risk and confirmation thresholds are then applied to these scores.
7.4 Scoring and labels
• Risk: If scoreBull ≥ sharpScoreRisk, a “Sharp ↑ Risk” label is drawn above the bar. If scoreBear ≥ sharpScoreRisk, a “Sharp ↓ Risk” label is drawn below the bar.
• Confirmation: A risk label is upgraded to “Sharp ↑” when scoreBull ≥ sharpScoreConfirm and the bar closes above the highest recent pivot (HH1); for bearish cases, confirmation requires scoreBear ≥ sharpScoreConfirm and a close below the lowest pivot (LL1).
• Label positioning: Labels are offset from the candle by ATR × sharpLabelMult (full ATR times multiplier), not half, and may include a dashed or dotted connector line if enabled.
Figure caption, In this chart both bullish and bearish sharp‑move setups have been flagged. Earlier in the range, a “Sharp ↓ Risk” label appears beneath a candle: the sell‑side score met the risk threshold, signaling that the combination of strong sell volume, dominance and absorption within a narrow range suggested a potential sharp decline. The price did not close below the lower pivot, so this label remains a “risk” and no confirmation occurred. Later, as the market recovered and volume shifted back to the buy side, a “Sharp ↑ Risk” label prints above a candle near the top of the channel. Here, buy‑side dominance, cumulative delta divergence and a volume climax aligned, but price has not yet closed above the upper pivot (HH1), so the alert is still a risk rather than a confirmed sharp‑up move.
Figure caption, In this chart a Sharp ↑ label is displayed above a candle, indicating that the sharp move module has confirmed a bullish breakout. Prior bars satisfied the risk threshold — showing buy‑side dominance, positive cumulative delta divergence, a volume climax and strong absorption in a narrow range — and this candle closes above the highest recent pivot, upgrading the earlier “Sharp ↑ Risk” alert to a full Sharp ↑ signal. The green label is offset from the candle with a dashed connector, while the red and green trend lines trace the high and low pivot trajectories and the dashed horizontals mark the highest and lowest values of the lookback window.
8. Market‑Maker / Spread‑Capture Module
8.1 Concept
Liquidity providers often “capture the spread” by buying and selling in almost equal amounts within a very narrow price range. These bars can signal temporary congestion before a move or reflect algorithmic activity. This module flags bars where both buyer and seller volumes are high, the price range is only a few ticks and the buy/sell split remains close to 50%. It helps traders spot potential liquidity pockets.
8.2 Inputs
• scalpLookback: Window length used to compute volume averages.
• scalpVolMult: Multiplier applied to each side’s average volume; both buy and sell volumes must exceed this multiple.
• scalpTickCount: Maximum allowed number of ticks in a bar’s range (calculated as (high − low) / minTick). A value of 1 or 2 captures ultra‑small bars; increasing it relaxes the range requirement.
• scalpDeltaRatio: Maximum deviation from a perfect 50/50 split. For example, 0.05 means the buyer share must be between 45% and 55%.
• Label settings: ATR length, multiplier, size, colors, connector style and width.
• Toggles : show_scalp_module and show_scalp_labels to enable the module and its labels.
8.3 Signal
When, on the current bar, both TF_buy_breakout and TF_sell_breakout exceed scalpVolMult times their respective averages and (high − low)/minTick ≤ scalpTickCount and the buyer share is within scalpDeltaRatio of 50%, the module prints a “Spread ↔” label above the bar. The label uses the same ATR offset logic as other modules and draws a connector if enabled.
Figure caption, In this chart the spread‑capture module has identified a potential liquidity pocket. Buyer and seller volumes both spiked above their recent averages, yet the candle’s range measured only a couple of ticks and the buy/sell split stayed close to 50 %. This combination met the module’s criteria, so it printed a grey “Spread ↔” label above the bar. The red and green trend lines link the earliest and latest high and low pivots, and the dashed horizontals mark the highest high and lowest low within the current lookback window.
9. Money Flow Module
9.1 Concept
To translate volume into a monetary measure, this module multiplies each side’s volume by the closing price. It tracks buying and selling system money default currency on a per-bar basis and sums them over a chosen period. The difference between buy and sell currencies (Δ$) shows net inflow or outflow.
9.2 Inputs
• mf_period_len_mf: Number of bars used for summing buy and sell dollars.
• Label appearance settings: ATR length, multiplier, size, colors for up/down labels, and connector style and width.
• Toggles: Use enableMoneyFlowLabel_mf and showMFLabels to control whether the module and its labels are displayed.
9.3 Calculations
• Per-bar money: Buy $ = TF_buy_breakout × close; Sell $ = TF_sell_breakout × close. Their difference is Δ$ = Buy $ − Sell $.
• Summations: Over mf_period_len_mf bars, compute Σ Buy $, Σ Sell $ and ΣΔ$ using math.sum().
• Info table entries: Rows 9–13 display these values as texts like “↑ USD 1234 (1M)” or “ΣΔ USD −5678 (14)”, with colors reflecting whether buyers or sellers dominate.
• Money flow status: If Δ$ is positive the bar is marked “Money flow in” ; if negative, “Money flow out” ; if zero, “Neutral”. The cumulative status is similarly derived from ΣΔ.Labels print at the bar that changes the sign of ΣΔ, offset using ATR × label multiplier and styled per user preferences.
Figure caption, The chart illustrates a steady rise toward the highest recent pivot (HH1) with price riding between a rising green trend‑line and a red trend‑line drawn through earlier pivot highs. A green Money flow in label appears above the bar near the top of the channel, signaling that net dollar flow turned positive on this bar: buy‑side dollar volume exceeded sell‑side dollar volume, pushing the cumulative sum ΣΔ$ above zero. In the info table, the “Money flow (bar)” and “Money flow Σ” rows both read In, confirming that the indicator’s money‑flow module has detected an inflow at both bar and aggregate levels, while other modules (pivots, trend lines and support/resistance) remain active to provide structural context.
In this example the Money Flow module signals a net outflow. Price has been trending downward: successive high pivots form a falling red trend‑line and the low pivots form a descending green support line. When the latest bar broke below the previous low pivot (LL1), both the bar‑level and cumulative net dollar flow turned negative—selling volume at the close exceeded buying volume and pushed the cumulative Δ$ below zero. The module reacts by printing a red “Money flow out” label beneath the candle; the info table confirms that the “Money flow (bar)” and “Money flow Σ” rows both show Out, indicating sustained dominance of sellers in this period.
10. Info Table
10.1 Purpose
When enabled, the Info Table appears in the lower right of your chart. It summarises key values computed by the indicator—such as buy and sell volume, delta, total volume, breakout status, market phase, and money flow—so you can see at a glance which side is dominant and which signals are active.
10.2 Symbols
• ↑ / ↓ — Up (↑) denotes buy volume or money; down (↓) denotes sell volume or money.
• MA — Moving average. In the table it shows the average value of a series over the lookback period.
• Σ (Sigma) — Cumulative sum over the chosen lookback period.
• Δ (Delta) — Difference between buy and sell values.
• B / S — Buyer and seller share of total volume, expressed as percentages.
• Ref. Price — Reference price for breakout calculations, based on the latest pivot.
• Status — Indicates whether a breakout condition is currently active (True) or has failed.
10.3 Row definitions
1. Up volume / MA up volume – Displays current buy volume on the lower timeframe and its moving average over the lookback period.
2. Down volume / MA down volume – Shows current sell volume and its moving average; sell values are formatted in red for clarity.
3. Δ / ΣΔ – Lists the difference between buy and sell volume for the current bar and the cumulative delta volume over the lookback period.
4. Σ / MA Σ (Vol/MA) – Total volume (buy + sell) for the bar, with the ratio of this volume to its moving average; the right cell shows the average total volume.
5. B/S ratio – Buy and sell share of the total volume: current bar percentages and the average percentages across the lookback period.
6. Buyer Rank / Seller Rank – Ranks the bar’s buy and sell volumes among the last (n) bars; lower rank numbers indicate higher relative volume.
7. Σ Buy / Σ Sell – Sum of buy and sell volumes over the lookback window, indicating which side has traded more.
8. Breakout UP / DOWN – Shows the breakout thresholds (Ref. Price) and whether the breakout condition is active (True) or has failed.
9. Market Phase (Vol) – Reports the current volume‑only phase: Accumulation, Distribution or Neutral.
10. Money Flow – The final rows display dollar amounts and status:
– ↑ USD / Σ↑ USD – Buy dollars for the current bar and the cumulative sum over the money‑flow period.
– ↓ USD / Σ↓ USD – Sell dollars and their cumulative sum.
– Δ USD / ΣΔ USD – Net dollar difference (buy minus sell) for the bar and cumulatively.
– Money flow (bar) – Indicates whether the bar’s net dollar flow is positive (In), negative (Out) or neutral.
– Money flow Σ – Shows whether the cumulative net dollar flow across the chosen period is positive, negative or neutral.
The chart above shows a sequence of different signals from the indicator. A Bull Trap Risk appears after price briefly pushes above resistance but fails to hold, then a green Accum label identifies an accumulation phase. An upward breakout follows, confirmed by a Money flow in print. Later, a Sharp ↓ Risk warns of a possible sharp downturn; after price dips below support but quickly recovers, a Bear Trap label marks a false breakdown. The highlighted info table in the center summarizes key metrics at that moment, including current and average buy/sell volumes, net delta, total volume versus its moving average, breakout status (up and down), market phase (volume), and bar‑level and cumulative money flow (In/Out).
11. Conclusion & Final Remarks
This indicator was developed as a holistic study of market structure and order flow. It brings together several well‑known concepts from technical analysis—breakouts, accumulation and distribution phases, overbought and oversold extremes, bull and bear traps, sharp directional moves, market‑maker spread bars and money flow—into a single Pine Script tool. Each module is based on widely recognized trading ideas and was implemented after consulting reference materials and example strategies, so you can see in real time how these concepts interact on your chart.
A distinctive feature of this indicator is its reliance on per‑side volume: instead of tallying only total volume, it separately measures buy and sell transactions on a lower time frame. This approach gives a clearer view of who is in control—buyers or sellers—and helps filter breakouts, detect phases of accumulation or distribution, recognize potential traps, anticipate sharp moves and gauge whether liquidity providers are active. The money‑flow module extends this analysis by converting volume into currency values and tracking net inflow or outflow across a chosen window.
Although comprehensive, this indicator is intended solely as a guide. It highlights conditions and statistics that many traders find useful, but it does not generate trading signals or guarantee results. Ultimately, you remain responsible for your positions. Use the information presented here to inform your analysis, combine it with other tools and risk‑management techniques, and always make your own decisions when trading.
SMC Structures and FVGสวัสดีครับ! ผมจะอธิบายอินดิเคเตอร์ "SMC Structures and FVG + MACD" ที่คุณให้มาอย่างละเอียดในแต่ละส่วน เพื่อให้คุณเข้าใจการทำงานของมันอย่างถ่องแท้ครับ
อินดิเคเตอร์นี้เป็นการผสมผสานแนวคิดของ Smart Money Concept (SMC) ซึ่งเน้นการวิเคราะห์โครงสร้างตลาด (Market Structure) และ Fair Value Gap (FVG) เข้ากับอินดิเคเตอร์ MACD เพื่อใช้เป็นตัวกรองหรือตัวยืนยันสัญญาณ Choch/BoS (Change of Character / Break of Structure)
1. ภาพรวมอินดิเคเตอร์ (Overall Purpose)
อินดิเคเตอร์นี้มีจุดประสงค์หลักคือ:
ระบุโครงสร้างตลาด: ตีเส้นและป้ายกำกับ Choch (Change of Character) และ BoS (Break of Structure) บนกราฟโดยอัตโนมัติ
ผสานการยืนยันด้วย MACD: สัญญาณ Choch/BoS จะถูกพิจารณาก็ต่อเมื่อ MACD Histogram เกิดการตัดขึ้นหรือลง (Zero Cross) ในทิศทางที่สอดคล้องกัน
แสดง Fair Value Gap (FVG): หากเปิดใช้งาน จะมีการตีกล่อง FVG บนกราฟ
แสดงระดับ Fibonacci: คำนวณและแสดงระดับ Fibonacci ที่สำคัญตามโครงสร้างตลาดปัจจุบัน
ปรับตาม Timeframe: การคำนวณและการแสดงผลทั้งหมดจะปรับตาม Timeframe ที่คุณกำลังใช้งานอยู่โดยอัตโนมัติ
2. ส่วนประกอบหลักของโค้ด (Code Breakdown)
โค้ดนี้สามารถแบ่งออกเป็นส่วนหลัก ๆ ได้ดังนี้:
2.1 Inputs (การตั้งค่า)
ส่วนนี้คือตัวแปรที่คุณสามารถปรับแต่งได้ในหน้าต่างการตั้งค่าของอินดิเคเตอร์ (คลิกที่รูปฟันเฟืองข้างชื่ออินดิเคเตอร์บนกราฟ)
MACD Settings (ตั้งค่า MACD):
fast_len: ความยาวของ Fast EMA สำหรับ MACD (ค่าเริ่มต้น 12)
slow_len: ความยาวของ Slow EMA สำหรับ MACD (ค่าเริ่มต้น 26)
signal_len: ความยาวของ Signal Line สำหรับ MACD (ค่าเริ่มต้น 9)
= ta.macd(close, fast_len, slow_len, signal_len): คำนวณค่า MACD Line, Signal Line และ Histogram โดยใช้ราคาปิด (close) และค่าความยาวที่กำหนด
is_bullish_macd_cross: ตรวจสอบว่า MACD Histogram ตัดขึ้นเหนือเส้น 0 (จากค่าลบเป็นบวก)
is_bearish_macd_cross: ตรวจสอบว่า MACD Histogram ตัดลงใต้เส้น 0 (จากค่าบวกเป็นลบ)
Fear Value Gap (FVG) Settings:
isFvgToShow: (Boolean) เปิด/ปิดการแสดง FVG บนกราฟ
bullishFvgColor: สีสำหรับ Bullish FVG
bearishFvgColor: สีสำหรับ Bearish FVG
mitigatedFvgColor: สีสำหรับ FVG ที่ถูก Mitigate (ลดทอน) แล้ว
fvgHistoryNbr: จำนวน FVG ย้อนหลังที่จะแสดง
isMitigatedFvgToReduce: (Boolean) เปิด/ปิดการลดขนาด FVG เมื่อถูก Mitigate
Structures (โครงสร้างตลาด) Settings:
isStructBodyCandleBreak: (Boolean) หากเป็น true การ Break จะต้องเกิดขึ้นด้วย เนื้อเทียน ที่ปิดเหนือ/ใต้ Swing High/Low หากเป็น false แค่ไส้เทียนทะลุก็ถือว่า Break
isCurrentStructToShow: (Boolean) เปิด/ปิดการแสดงเส้นโครงสร้างตลาดปัจจุบัน (เส้นสีน้ำเงินในภาพตัวอย่าง)
pivot_len: ความยาวของแท่งเทียนที่ใช้ในการมองหาจุด Pivot (Swing High/Low) ยิ่งค่าน้อยยิ่งจับ Swing เล็กๆ ได้, ยิ่งค่ามากยิ่งจับ Swing ใหญ่ๆ ได้
bullishBosColor, bearishBosColor: สีสำหรับเส้นและป้าย BOS ขาขึ้น/ขาลง
bosLineStyleOption, bosLineWidth: สไตล์ (Solid, Dotted, Dashed) และความหนาของเส้น BOS
bullishChochColor, bearishChochColor: สีสำหรับเส้นและป้าย CHoCH ขาขึ้น/ขาลง
chochLineStyleOption, chochLineWidth: สไตล์ (Solid, Dotted, Dashed) และความหนาของเส้น CHoCH
currentStructColor, currentStructLineStyleOption, currentStructLineWidth: สี, สไตล์ และความหนาของเส้นโครงสร้างตลาดปัจจุบัน
structHistoryNbr: จำนวนการ Break (Choch/BoS) ย้อนหลังที่จะแสดง
Structure Fibonacci (จากโค้ดต้นฉบับ):
เป็นชุด Input สำหรับเปิด/ปิด, กำหนดค่า, สี, สไตล์ และความหนาของเส้น Fibonacci Levels ต่างๆ (0.786, 0.705, 0.618, 0.5, 0.382) ที่จะถูกคำนวณจากโครงสร้างตลาดปัจจุบัน
2.2 Helper Functions (ฟังก์ชันช่วยทำงาน)
getLineStyle(lineOption): ฟังก์ชันนี้ใช้แปลงค่า String ที่เลือกจาก Input (เช่น "─", "┈", "╌") ให้เป็นรูปแบบ line.style_ ที่ Pine Script เข้าใจ
get_structure_highest_bar(lookback): ฟังก์ชันนี้พยายามหา Bar Index ของแท่งเทียนที่ทำ Swing High ภายในช่วง lookback ที่กำหนด
get_structure_lowest_bar(lookback): ฟังก์ชันนี้พยายามหา Bar Index ของแท่งเทียนที่ทำ Swing Low ภายในช่วง lookback ที่กำหนด
is_structure_high_broken(...): ฟังก์ชันนี้ตรวจสอบว่าราคาปัจจุบันได้ Break เหนือ _structureHigh (Swing High) หรือไม่ โดยพิจารณาจาก _highStructBreakPrice (ราคาปิดหรือราคา High ขึ้นอยู่กับการตั้งค่า isStructBodyCandleBreak)
FVGDraw(...): ฟังก์ชันนี้รับ Arrays ของ FVG Boxes, Types, Mitigation Status และ Labels มาประมวลผล เพื่ออัปเดตสถานะของ FVG (เช่น ถูก Mitigate หรือไม่) และปรับขนาด/ตำแหน่งของ FVG Box และ Label บนกราฟ
2.3 Global Variables (ตัวแปรทั่วทั้งอินดิเคเตอร์)
เป็นตัวแปรที่ประกาศด้วย var ซึ่งหมายความว่าค่าของมันจะถูกเก็บไว้และอัปเดตในแต่ละแท่งเทียน (persists across bars)
structureLines, structureLabels: Arrays สำหรับเก็บอ็อบเจกต์ line และ label ของเส้น Choch/BoS ที่วาดบนกราฟ
fvgBoxes, fvgTypes, fvgLabels, isFvgMitigated: Arrays สำหรับเก็บข้อมูลของ FVG Boxes และสถานะต่างๆ
structureHigh, structureLow: เก็บราคาของ Swing High/Low ที่สำคัญของโครงสร้างตลาดปัจจุบัน
structureHighStartIndex, structureLowStartIndex: เก็บ Bar Index ของจุดเริ่มต้นของ Swing High/Low ที่สำคัญ
structureDirection: เก็บสถานะของทิศทางโครงสร้างตลาด (1 = Bullish, 2 = Bearish, 0 = Undefined)
fiboXPrice, fiboXStartIndex, fiboXLine, fiboXLabel: ตัวแปรสำหรับเก็บข้อมูลและอ็อบเจกต์ของเส้น Fibonacci Levels
isBOSAlert, isCHOCHAlert: (Boolean) ใช้สำหรับส่งสัญญาณ Alert (หากมีการตั้งค่า Alert ไว้)
2.4 FVG Processing (การประมวลผล FVG)
ส่วนนี้จะตรวจสอบเงื่อนไขการเกิด FVG (Bullish FVG: high < low , Bearish FVG: low > high )
หากเกิด FVG และ isFvgToShow เป็น true จะมีการสร้าง box และ label ใหม่เพื่อแสดง FVG บนกราฟ
มีการจัดการ fvgBoxes และ fvgLabels เพื่อจำกัดจำนวน FVG ที่แสดงตาม fvgHistoryNbr และลบ FVG เก่าออก
ฟังก์ชัน FVGDraw จะถูกเรียกเพื่ออัปเดตสถานะของ FVG (เช่น การถูก Mitigate) และปรับการแสดงผล
2.5 Structures Processing (การประมวลผลโครงสร้างตลาด)
Initialization: ที่ bar_index == 0 (แท่งเทียนแรกของกราฟ) จะมีการกำหนดค่าเริ่มต้นให้กับ structureHigh, structureLow, structureHighStartIndex, structureLowStartIndex
Finding Current High/Low: highest, highestBar, lowest, lowestBar ถูกใช้เพื่อหา High/Low ที่สุดและ Bar Index ของมันใน 10 แท่งล่าสุด (หรือทั้งหมดหากกราฟสั้นกว่า 10 แท่ง)
Calculating Structure Max/Min Bar: structureMaxBar และ structureMinBar ใช้ฟังก์ชัน get_structure_highest_bar และ get_structure_lowest_bar เพื่อหา Bar Index ของ Swing High/Low ที่แท้จริง (ไม่ใช่แค่ High/Low ที่สุดใน lookback แต่เป็นจุด Pivot ที่สมบูรณ์)
Break Price: lowStructBreakPrice และ highStructBreakPrice จะเป็นราคาปิด (close) หรือราคา Low/High ขึ้นอยู่กับ isStructBodyCandleBreak
isStuctureLowBroken / isStructureHighBroken: เงื่อนไขเหล่านี้ตรวจสอบว่าราคาได้ทำลาย structureLow หรือ structureHigh หรือไม่ โดยพิจารณาจากราคา Break, ราคาแท่งก่อนหน้า และ Bar Index ของจุดเริ่มต้นโครงสร้าง
Choch/BoS Logic (ส่วนสำคัญที่ถูกผสานกับ MACD):
if(isStuctureLowBroken and is_bearish_macd_cross): นี่คือจุดที่ MACD เข้ามามีบทบาท หากราคาทำลาย structureLow (สัญญาณขาลง) และ MACD Histogram เกิด Bearish Zero Cross (is_bearish_macd_cross เป็น true) อินดิเคเตอร์จะพิจารณาว่าเป็น Choch หรือ BoS
หาก structureDirection == 1 (เดิมเป็นขาขึ้น) หรือ 0 (ยังไม่กำหนด) จะตีเป็น "CHoCH" (เปลี่ยนทิศทางโครงสร้างเป็นขาลง)
หาก structureDirection == 2 (เดิมเป็นขาลง) จะตีเป็น "BOS" (ยืนยันโครงสร้างขาลง)
มีการสร้าง line.new และ label.new เพื่อวาดเส้นและป้ายกำกับ
structureDirection จะถูกอัปเดตเป็น 1 (Bullish)
structureHighStartIndex, structureLowStartIndex, structureHigh, structureLow จะถูกอัปเดตเพื่อกำหนดโครงสร้างใหม่
else if(isStructureHighBroken and is_bullish_macd_cross): เช่นกันสำหรับขาขึ้น หากราคาทำลาย structureHigh (สัญญาณขาขึ้น) และ MACD Histogram เกิด Bullish Zero Cross (is_bullish_macd_cross เป็น true) อินดิเคเตอร์จะพิจารณาว่าเป็น Choch หรือ BoS
หาก structureDirection == 2 (เดิมเป็นขาลง) หรือ 0 (ยังไม่กำหนด) จะตีเป็น "CHoCH" (เปลี่ยนทิศทางโครงสร้างเป็นขาขึ้น)
หาก structureDirection == 1 (เดิมเป็นขาขึ้น) จะตีเป็น "BOS" (ยืนยันโครงสร้างขาขึ้น)
มีการสร้าง line.new และ label.new เพื่อวาดเส้นและป้ายกำกับ
structureDirection จะถูกอัปเดตเป็น 2 (Bearish)
structureHighStartIndex, structureLowStartIndex, structureHigh, structureLow จะถูกอัปเดตเพื่อกำหนดโครงสร้างใหม่
การลบเส้นเก่า: d.delete_line (หากไลบรารีทำงาน) จะถูกเรียกเพื่อลบเส้นและป้ายกำกับเก่าออกเมื่อจำนวนเกิน structHistoryNbr
Updating Structure High/Low (else block): หากไม่มีการ Break เกิดขึ้น แต่ราคาปัจจุบันสูงกว่า structureHigh หรือต่ำกว่า structureLow ในทิศทางที่สอดคล้องกัน (เช่น ยังคงเป็นขาขึ้นและทำ High ใหม่) structureHigh หรือ structureLow จะถูกอัปเดตเพื่อติดตาม High/Low ที่สุดของโครงสร้างปัจจุบัน
Current Structure Display:
หาก isCurrentStructToShow เป็น true อินดิเคเตอร์จะวาดเส้น structureHighLine และ structureLowLine เพื่อแสดงขอบเขตของโครงสร้างตลาดปัจจุบัน
Fibonacci Display:
หาก isFiboXToShow เป็น true อินดิเคเตอร์จะคำนวณและวาดเส้น Fibonacci Levels ต่างๆ (0.786, 0.705, 0.618, 0.5, 0.382) โดยอิงจาก structureHigh และ structureLow ของโครงสร้างตลาดปัจจุบัน
Alerts:
alertcondition: ใช้สำหรับตั้งค่า Alert ใน TradingView เมื่อเกิดสัญญาณ BOS หรือ CHOCH
plot(na):
plot(na) เป็นคำสั่งที่สำคัญในอินดิเคเตอร์ที่ไม่ได้ต้องการพล็อต Series ของข้อมูลบนกราฟ (เช่น ไม่ได้พล็อตเส้น EMA หรือ RSI) แต่ใช้วาดอ็อบเจกต์ (Line, Label, Box) โดยตรง
การมี plot(na) ช่วยให้ Pine Script รู้ว่าอินดิเคเตอร์นี้มีเอาต์พุตที่แสดงผลบนกราฟ แม้ว่าจะไม่ได้เป็น Series ที่พล็อตตามปกติก็ตาม
3. วิธีใช้งาน
คัดลอกโค้ดทั้งหมด ที่อยู่ในบล็อก immersive ด้านบน
ไปที่ TradingView และเปิดกราฟที่คุณต้องการ
คลิกที่เมนู "Pine Editor" ที่อยู่ด้านล่างของหน้าจอ
ลบโค้ดเดิมที่มีอยู่ และ วางโค้ดที่คัดลอกมา ลงไปแทน
คลิกที่ปุ่ม "Add to Chart"
อินดิเคเตอร์จะถูกเพิ่มลงในกราฟของคุณโดยอัตโนมัติ คุณสามารถคลิกที่รูปฟันเฟืองข้างชื่ออินดิเคเตอร์บนกราฟเพื่อเข้าถึงหน้าต่างการตั้งค่าและปรับแต่งตามความต้องการของคุณได้
Hello! I will explain the "SMC Structures and FVG + MACD" indicator you provided in detail, section by section, so you can fully understand how it works.This indicator combines the concepts of Smart Money Concept (SMC), which focuses on analyzing Market Structure and Fair Value Gaps (FVG), with the MACD indicator to serve as a filter or confirmation for Choch (Change of Character) and BoS (Break of Structure) signals.1. Overall PurposeThe main purposes of this indicator are:Identify Market Structure: Automatically draw lines and label Choch (Change of Character) and BoS (Break of Structure) on the chart.Integrate MACD Confirmation: Choch/BoS signals will only be considered when the MACD Histogram performs a cross (Zero Cross) in the corresponding direction.Display Fair Value Gap (FVG): If enabled, FVG boxes will be drawn on the chart.Display Fibonacci Levels: Calculate and display important Fibonacci levels based on the current market structure.Adapt to Timeframe: All calculations and displays will automatically adjust to the timeframe you are currently using.2. Code BreakdownThis code can be divided into the following main sections:2.1 Inputs (Settings)This section contains variables that you can adjust in the indicator's settings window (click the gear icon next to the indicator's name on the chart).MACD Settings:fast_len: Length of the Fast EMA for MACD (default 12)slow_len: Length of the Slow EMA for MACD (default 26)signal_len: Length of the Signal Line for MACD (default 9) = ta.macd(close, fast_len, slow_len, signal_len): Calculates the MACD Line, Signal Line, and Histogram using the closing price (close) and the specified lengths.is_bullish_macd_cross: Checks if the MACD Histogram crosses above the 0 line (from negative to positive).is_bearish_macd_cross: Checks if the MACD Histogram crosses below the 0 line (from positive to negative).Fear Value Gap (FVG) Settings:isFvgToShow: (Boolean) Enables/disables the display of FVG on the chart.bullishFvgColor: Color for Bullish FVG.bearishFvgColor: Color for Bearish FVG.mitigatedFvgColor: Color for FVG that has been mitigated.fvgHistoryNbr: Number of historical FVG to display.isMitigatedFvgToReduce: (Boolean) Enables/disables reducing the size of FVG when mitigated.Structures (โครงสร้างตลาด) Settings:isStructBodyCandleBreak: (Boolean) If true, the break must occur with the candle body closing above/below the Swing High/Low. If false, a wick break is sufficient.isCurrentStructToShow: (Boolean) Enables/disables the display of the current market structure lines (blue lines in the example image).pivot_len: Lookback length for identifying Pivot points (Swing High/Low). A smaller value captures smaller, more frequent swings; a larger value captures larger, more significant swings.bullishBosColor, bearishBosColor: Colors for bullish/bearish BOS lines and labels.bosLineStyleOption, bosLineWidth: Style (Solid, Dotted, Dashed) and width of BOS lines.bullishChochColor, bearishChochColor: Colors for bullish/bearish CHoCH lines and labels.chochLineStyleOption, chochLineWidth: Style (Solid, Dotted, Dashed) and width of CHoCH lines.currentStructColor, currentStructLineStyleOption, currentStructLineWidth: Color, style, and width of the current market structure lines.structHistoryNbr: Number of historical breaks (Choch/BoS) to display.Structure Fibonacci (from original code):A set of inputs to enable/disable, define values, colors, styles, and widths for various Fibonacci Levels (0.786, 0.705, 0.618, 0.5, 0.382) that will be calculated from the current market structure.2.2 Helper FunctionsgetLineStyle(lineOption): This function converts the selected string input (e.g., "─", "┈", "╌") into a line.style_ format understood by Pine Script.get_structure_highest_bar(lookback): This function attempts to find the Bar Index of the Swing High within the specified lookback period.get_structure_lowest_bar(lookback): This function attempts to find the Bar Index of the Swing Low within the specified lookback period.is_structure_high_broken(...): This function checks if the current price has broken above _structureHigh (Swing High), considering _highStructBreakPrice (closing price or high price depending on isStructBodyCandleBreak setting).FVGDraw(...): This function takes arrays of FVG Boxes, Types, Mitigation Status, and Labels to process and update the status of FVG (e.g., whether it's mitigated) and adjust the size/position of FVG Boxes and Labels on the chart.2.3 Global VariablesThese are variables declared with var, meaning their values are stored and updated on each bar (persists across bars).structureLines, structureLabels: Arrays to store line and label objects for Choch/BoS lines drawn on the chart.fvgBoxes, fvgTypes, fvgLabels, isFvgMitigated: Arrays to store FVG box data and their respective statuses.structureHigh, structureLow: Stores the price of the significant Swing High/Low of the current market structure.structureHighStartIndex, structureLowStartIndex: Stores the Bar Index of the start point of the significant Swing High/Low.structureDirection: Stores the status of the market structure direction (1 = Bullish, 2 = Bearish, 0 = Undefined).fiboXPrice, fiboXStartIndex, fiboXLine, fiboXLabel: Variables to store data and objects for Fibonacci Levels.isBOSAlert, isCHOCHAlert: (Boolean) Used to trigger alerts in TradingView (if alerts are configured).2.4 FVG ProcessingThis section checks the conditions for FVG formation (Bullish FVG: high < low , Bearish FVG: low > high ).If FVG occurs and isFvgToShow is true, a new box and label are created to display the FVG on the chart.fvgBoxes and fvgLabels are managed to limit the number of FVG displayed according to fvgHistoryNbr and remove older FVG.The FVGDraw function is called to update the FVG status (e.g., whether it's mitigated) and adjust its display.2.5 Structures ProcessingInitialization: At bar_index == 0 (the first bar of the chart), structureHigh, structureLow, structureHighStartIndex, and structureLowStartIndex are initialized.Finding Current High/Low: highest, highestBar, lowest, lowestBar are used to find the highest/lowest price and its Bar Index of it in the last 10 bars (or all bars if the chart is shorter than 10 bars).Calculating Structure Max/Min Bar: structureMaxBar and structureMinBar use get_structure_highest_bar and get_structure_lowest_bar functions to find the Bar Index of the true Swing High/Low (not just the highest/lowest in the lookback but a complete Pivot point).Break Price: lowStructBreakPrice and highStructBreakPrice will be the closing price (close) or the Low/High price, depending on the isStructBodyCandleBreak setting.isStuctureLowBroken / isStructureHighBroken: These conditions check if the price has broken structureLow or structureHigh, considering the break price, previous bar prices, and the Bar Index of the structure's starting point.Choch/BoS Logic (Key Integration with MACD):if(isStuctureLowBroken and is_bearish_macd_cross): This is where MACD plays a role. If the price breaks structureLow (bearish signal) AND the MACD Histogram performs a Bearish Zero Cross (is_bearish_macd_cross is true), the indicator will consider it a Choch or BoS.If structureDirection == 1 (previously bullish) or 0 (undefined), it will be labeled "CHoCH" (changing structure direction to bearish).If structureDirection == 2 (already bearish), it will be labeled "BOS" (confirming bearish structure).line.new and label.new are used to draw the line and label.structureDirection will be updated to 1 (Bullish).structureHighStartIndex, structureLowStartIndex, structureHigh, structureLow will be updated to define the new structure.else if(isStructureHighBroken and is_bullish_macd_cross): Similarly for bullish breaks. If the price breaks structureHigh (bullish signal) AND the MACD Histogram performs a Bullish Zero Cross (is_bullish_macd_cross is true), the indicator will consider it a Choch or BoS.If structureDirection == 2 (previously bearish) or 0 (undefined), it will be labeled "CHoCH" (changing structure direction to bullish).If structureDirection == 1 (already bullish), it will be labeled "BOS" (confirming bullish structure).line.new and label.new are used to draw the line and label.structureDirection will be updated to 2 (Bearish).structureHighStartIndex, structureLowStartIndex, structureHigh, structureLow will be updated to define the new structure.Deleting Old Lines: d.delete_line (if the library works) will be called to delete old lines and labels when their number exceeds structHistoryNbr.Updating Structure High/Low (else block): If no break occurs, but the current price is higher than structureHigh or lower than structureLow in the corresponding direction (e.g., still bullish and making a new high), structureHigh or structureLow will be updated to track the highest/lowest point of the current structure.Current Structure Display:If isCurrentStructToShow is true, the indicator draws structureHighLine and structureLowLine to show the boundaries of the current market structure.Fibonacci Display:If isFiboXToShow is true, the indicator calculates and draws various Fibonacci Levels (0.786, 0.705, 0.618, 0.5, 0.382) based on the structureHigh and structureLow of the current market structure.Alerts:alertcondition: Used to set up alerts in TradingView when BOS or CHOCH signals occur.plot(na):plot(na) is an important statement in indicators that do not plot data series directly on the chart (e.g., not plotting EMA or RSI lines) but instead draw objects (Line, Label, Box).Having plot(na) helps Pine Script recognize that this indicator has an output displayed on the chart, even if it's not a regularly plotted series.3. How to UseCopy all the code in the immersive block above.Go to TradingView and open your desired chart.Click on the "Pine Editor" menu at the bottom of the screen.Delete any existing code and paste the copied code in its place.Click the "Add to Chart" button.The indicator will be added to your chart automatically. You can click the gear icon next to the indicator's name on the chart to access the settings window and customize it to your needs.I hope this explanation helps you understand this indicator in detail. If anything is unclear, or you need further adjustments, please let me know.
Opening Range Breakout with John Wick + CDH/CDLOpening Range Breakout (ORB) De Luxe with John Wick Pattern - User Manual Table of Contents
1. Introduction
2. Key Features
3. Installation
4. Configuration Guide
5. Trading Signals
6. Pattern Recognition
7. Zone Trading
8. Alert Setup
9. Trading Strategies
10. Best Practices
11. Troubleshooting
________________________________________
1. Introduction The Opening Range Breakout (ORB) with John Wick indicator is a comprehensive trading tool designed for intraday and swing traders. It combines the classic Opening Range Breakout strategy with advanced candlestick pattern recognition, including the unique "John Wick" pattern. What is Opening Range Breakout? The Opening Range (OR) is the price range established during the first 15 minutes of a trading session. This range often acts as support and resistance for the remainder of the trading day. Breakouts above or below this range can signal strong directional moves. Key Concepts: • Opening Range High: The highest price during the first 15 minutes • Opening Range Low: The lowest price during the first 15 minutes • Breakout: Price movement above OR High (bullish) or below OR Low (bearish) • Pattern Zones: Areas around key levels where pattern recognition is most effective • PDH/PDL: Previous Day High and Previous Day Low - key reference levels from the prior trading day • CDH/CDL: Current Day High and Current Day Low - dynamically updating intraday extremes
________________________________________
2. Key Features Core Features: • Multi-Session Support: New York, London, Tokyo, Sydney, Frankfurt, and Custom sessions • Opening Range Visualization: Automatic OR High/Low detection and plotting • Pattern Recognition: Engulfing, Hammer/Shooting Star, Doji, and John Wick patterns • Zone Trading: Customizable zones around OR and PDH/PDL/CDH/CDL levels • Previous Day Levels: PDH (Previous Day High) and PDL (Previous Day Low) • Current Day Levels: CDH (Current Day High) and CDL (Current Day Low) - real-time tracking • Mid-Point Levels: Automatic calculation of OR mid-point • Real-Time Alerts: Breakout and pattern-based alerts • Multi-Timezone Support: Exchange or custom timezone selection Visual Features: • Dynamic color-coded levels • Triangle signals for breakouts • Pattern labels with clear identification • Information table with current session data • Fully customizable colors and styles
________________________________________
3. Installation Step 1: Add to Chart
4. Open TradingView and navigate to your desired chart
5. Click on "Indicators" (or press /)
6. Search for "Opening Range Breakout with John Wick"
7. Click to add the indicator to your chart Step 2: Initial Setup
8. The indicator will automatically detect your chart's timezone
9. Default session is set to "New York"
10. All features are enabled by default Recommended Timeframes: • Optimal: 1-minute to 15-minute charts • Suitable: Up to 1-hour charts • Not Recommended: Daily or higher timeframes
________________________________________
4. Configuration Guide Timezone Settings Use Exchange Timezone • Enabled (Default): Uses the exchange's native timezone • Disabled: Uses chart timezone or custom selection Timezone Selection Available when "Use Exchange Timezone" is disabled: • America/New_York • Europe/London • Europe/Amsterdam • Asia/Tokyo • Australia/Sydney Session Selection Trading Sessions • Sydney: 09:00-16:00 Sydney time • Tokyo: 09:00-15:00 Tokyo time • London: 08:00-16:30 London time • Frankfurt: 09:00-17:30 Frankfurt time • New York: 09:30-16:00 New York time • Custom: User-defined session • Previous Sessions: Shows multiple historical ORs Custom Session Settings • Custom Session Time: Define your own trading hours • Custom Session Name: Label for your custom session Display Options Line Settings • Line Width: 1-5 (Default: 2) • Line Style: Solid, Dashed, or Dotted • Show Current Only: Hide historical OR lines • Show Session Name: Display session label on chart Color Customization • OR Resistance (High): Default red • OR Support (Low): Default green • Session Colors: Unique color per session type • Zone Colors: Separate colors for OR and PDH/PDL zones Pattern Zone Settings Zone Configuration • Show Pattern Detection Zone: Enable/disable zones • OR Zone Size: Percentage of OR range (Default: 2%) • PDH/PDL Zone Size: Percentage of PDH-PDL range (Default: 1.5%) • CDH/CDL Zone Size: Percentage of CDH-CDL range (Default: 1.5%) • Show Zone Labels: Display zone boundary values • Only Detect Patterns in Zone: Limit pattern detection to zones Mid-Point Settings • Show Opening Range Mid-Point: Display OR midline • Mid-Point Color: Default gray • Mid-Point Style: Dotted, Dashed, or Solid • Show Mid-Point Label: Display midpoint value Previous Day Levels • Show Previous Day High/Low: Enable PDH/PDL lines • PDH/PDL Colors: Default yellow • PDH/PDL Line Style: Customizable style • Show PDH/PDL Labels: Display level values
Current Day Levels • Show Current Day High/Low: Enable CDH/CDL lines • CDH/CDL Colors: Default blue • CDH/CDL Line Style: Customizable style • Show CDH/CDL Labels: Display level values • Update Frequency: Real-time updates as new highs/lows are made
________________________________________
5. Trading Signals Signal Types
6. Breakout Signals • Bullish (Buy): Green triangle below candle when price breaks above OR High • Bearish (Sell): Red triangle above candle when price breaks below OR Low
7. Pattern-Enhanced Signals Signals are generated when breakouts occur WITH confirming patterns: • Stronger probability of follow-through • Reduced false breakouts • Better risk/reward setups Signal Configuration Alert Settings • Enable Alerts: Turn alerts on/off • Show Buy/Sell Signals: Visual signals on chart • Show Signal Text: Display "BUY"/"SELL" labels Pattern Filter Options • Use Candle Pattern Filter: Require patterns for signals • Pattern Combination Mode: o Any Pattern: Signal on any single pattern o Multiple Patterns: Require minimum pattern count o Specific Combo: Require specific pattern combinations
________________________________________
6. Pattern Recognition Supported Patterns
7. Engulfing Pattern • Bullish Engulfing: Large green candle completely engulfs previous red candle • Bearish Engulfing: Large red candle completely engulfs previous green candle • Label: "E"
8. Hammer/Shooting Star • Hammer: Small body at top, long lower wick (2x body size) • Shooting Star: Small body at bottom, long upper wick (2x body size) • Labels: "H" (Hammer), "S" (Shooting Star)
9. Doji Pattern • Definition: Open and close nearly equal (body < 10% of average) • Significance: Indecision, potential reversal • Label: "D"
10. John Wick Pattern (Unique Feature) • Bullish John Wick: o Opens below previous candle's low o 30-70% of body extends below previous low o Strong momentum indication • Bearish John Wick: o Opens above previous candle's high o 30-70% of body extends above previous high • Label: "JW" Pattern Visualization • Pattern Markers: Small circular labels with pattern abbreviations • Pattern Count: Number showing total patterns detected • Pattern Background: Optional highlighting (disabled by default) • Positioning: o Bullish patterns: Below candles at varying distances o Bearish patterns: Above candles at varying distances
________________________________________
7. Zone Trading Zone Concept Zones are buffer areas around key levels where price action and patterns are monitored more closely. Zone Types
8. Opening Range Zones • OR High Zone: Area around the OR High level • OR Low Zone: Area around the OR Low level • Purpose: Identify potential breakout or rejection areas
9. PDH/PDL Zones • PDH Zone: Area around Previous Day High • PDL Zone: Area around Previous Day Low • Purpose: Monitor reactions at key daily levels
10. CDH/CDL Zones • CDH Zone: Area around Current Day High • CDL Zone: Area around Current Day Low • Purpose: Track reactions at evolving intraday extremes • Dynamic Nature: These zones move as new highs/lows are established Zone Features • Visual Representation: Semi-transparent colored boxes • Customizable Size: Percentage-based calculation • Pattern Detection: Option to only detect patterns within zones • Bar Coloring: Candles change color when in zones Zone Trading Strategy
11. Wait for price to enter a zone
12. Look for pattern formation within the zone
13. Trade breakouts with pattern confirmation
14. Use zone boundaries as stop-loss references
________________________________________
8. Alert Setup Creating Alerts Step 1: Basic Alert Setup
9. Right-click on the chart
10. Select "Add Alert"
11. Choose "ORB The Luxe" from Condition dropdown
12. Select alert type Step 2: Alert Types • Any alert() function call: All indicator alerts • Crossed above OR High: Bullish breakout • Crossed below OR Low: Bearish breakout Alert Messages Alerts include: • Session name (e.g., "New York") • Direction (above/below) • Level crossed • Pattern detected (if applicable) • Zone information (if in zone) Alert Best Practices
13. Set alerts after the OR is established (15+ minutes into session)
14. Use pattern filters to reduce false signals
15. Consider zone alerts for higher probability setups
16. Set stop-loss alerts at opposite OR level
________________________________________
9. Trading Strategies Strategy 1: Classic ORB
10. Entry: o Long: Break above OR High o Short: Break below OR Low
11. Stop Loss: Opposite OR level
12. Target: 1:2 or 1:3 risk/reward
13. Best Time: First 2 hours after OR Strategy 2: ORB with Pattern Confirmation
14. Entry Requirements: o Breakout signal o At least one confirming pattern o Preferably within a zone
15. Stop Loss: Mid-point of OR
16. Target: Previous day's high/low or current day's high/low
17. Win Rate: Higher than classic ORB Strategy 3: Zone Rejection Trading
18. Setup: Price enters zone but fails to break OR
19. Entry: Reversal pattern in zone
20. Stop Loss: Just outside zone boundary
21. Target: Opposite OR level
22. Best For: Range-bound markets Strategy 4: Multi-Session Confluence
23. Look for: Alignment of multiple session ORs
24. Entry: Break of aligned levels
25. Confirmation: Pattern at confluence point
26. Target: Extended moves expected
27. Additional Edge: Watch for CDH/CDL tests during the session
Strategy 5: CDH/CDL Breakout Trading
1. Setup: Price approaches current day's high or low
2. Entry: Break and hold above CDH or below CDL
3. Confirmation: Volume increase or pattern formation
4. Stop Loss: Just inside the CDH/CDL level
5. Target: Measured move based on intraday range
6. Best For: Trending days with momentum Risk Management Rules • Position Size: Risk 1-2% per trade • Max Daily Loss: 3-5% of account • Avoid: First and last 15 minutes of session • Best Days: Tuesday through Thursday
________________________________________
10. Best Practices Do's:
• Wait for OR to be established (15 minutes)
• Use multiple confirmations (pattern + zone + volume)
• Trade in the direction of the larger trend
• Set alerts to avoid missing opportunities
• Keep a trading journal of ORB trades
• Adjust zones based on market volatility
• Use proper position sizing Don'ts:
• Trade immediately at market open
• Ignore the overall market context
• Trade every OR breakout
• Use in choppy/low volume markets
• Set stops too close to entry
• Trade against strong trends
• Over-leverage positions Market Conditions Best Performance: • Trending days • High volume sessions • Economic news days • Clear market sentiment Avoid During: • Low volume holidays • Extremely choppy conditions • Major uncertainty events • End of month/quarter repositioning
________________________________________
11. Troubleshooting Common Issues and Solutions Issue: No signals appearing Solutions: • Ensure "Show Buy/Sell Signals" is enabled • Check if pattern filter is too restrictive • Verify correct session is selected • Confirm market has broken OR levels Issue: Too many false signals Solutions: • Enable pattern filter requirement • Use "Multiple Patterns" mode • Trade only within zones • Increase zone size percentage Issue: Incorrect session times Solutions: • Check timezone settings • Verify exchange timezone option • Use custom session for specific needs • Ensure chart timeframe is appropriate Issue: Overlapping indicators Solutions: • Disable pattern markers if too cluttered • Turn off signal text • Hide PDH/PDL or CDH/CDL if not needed • Use "Show Current Only" option Performance Tips
12. Reduce Chart Load: Hide historical sessions
13. Clean View: Disable unused pattern types
14. Mobile Trading: Increase line widths for visibility
15. Multiple Monitors: Use different sessions per screen Getting Help • Check indicator settings tooltips • Test on demo account first • Document your settings for consistency • Join ORB trading communities for tips
________________________________________
Conclusion The Opening Range Breakout with John Wick indicator is a powerful tool that combines time-tested ORB strategies with advanced pattern recognition. Success comes from understanding each component, practicing proper risk management, and adapting the tool to your trading style. Remember: No indicator guarantees profits. Always use proper risk management and continuous education to improve your trading results. Happy Trading!
________________________________________
Version: 1.0 Last Updated: June 2025 Pine Script Version: 6
Long and Short Term Highs and LowsLong and Short Term Highs and Lows
Overview:
This indicator is designed to help traders identify significant price points by marking new highs and lows over two distinct timeframes—a long-term and a short-term period. It achieves this by drawing optional channel lines that outline the highest highs and lowest lows over the chosen time periods and by plotting visual markers (triangles) on the chart when a new high or low is detected.
Key Features:
Dual Timeframe Analysis:
Long Term: Uses a user-defined “Time Period” (default 52) and “Time Unit” (default: Weekly) to determine long-term high and low levels.
Short Term: Uses a separate “Time Period” (default 50) and “Time Unit” (default: Daily) to compute short-term high and low levels.
Optional Channel Display:
For both long and short term periods, you have the option to display a channel by plotting the highest and lowest values as lines. This visual channel helps to delineate the range within which the price has traded over the selected period.
New High/Low Markers:
The indicator identifies moments when the highest high or lowest low is updated relative to the previous bar.
When a new high is established, an up triangle is plotted above the bar.
Conversely, when a new low occurs, a down triangle is plotted below the bar.
Separate input toggles allow you to enable or disable these markers independently for the long-term and short-term setups.
Inputs and Settings:
Long Term High/Low Period Settings:
Show New High/Low? (STW): Toggle to enable or disable the plotting of new high/low markers for the long-term period.
Time Period: The number of bars used to calculate the highest high and lowest low (default is 52).
Time Unit: The timeframe on which the long-term calculation is based (default is Weekly).
Show Channel? (SCW): Toggle to display the channel lines that connect the long-term high and low levels.
Short Term High/Low Period Settings:
Show New High/Low?: Toggle to enable or disable the plotting of new high/low markers for the short-term period.
Time Period: The number of bars used for calculating the short-term extremes (default is 50).
Time Unit: The timeframe on which the short-term calculations are based (default is Daily).
Show Channel?: Toggle to display the channel lines for the short-term highs and lows.
Indicator Logic:
Channel Calculation:
The script uses the request.security function to pull data from the specified timeframes. For each timeframe:
It calculates the lowest low over the defined period using ta.lowest.
It calculates the highest high over the defined period using ta.highest.
These values can be optionally plotted as channel lines when the “Show Channel?” option is enabled.
New High/Low Detection:
For each timeframe, the indicator compares the current high (or low) with its immediate previous value:
New High: When the current high exceeds the previous bar’s high, an up triangle is drawn above the bar.
New Low: When the current low falls below the previous bar’s low, a down triangle is drawn below the bar.
Usage and Interpretation:
Trend Identification:
When new highs (or lows) occur, they can signal the start of a strong upward (or downward) movement. The indicator helps you visually track these critical turning points over both longer and shorter periods.
Channel Breakouts:
The optional channel display offers additional context. Price movement beyond these channels may indicate a breakout or a significant shift in trend.
Customizable Timeframes:
You can adjust both the time period and time unit to fit your trading style—whether you’re focusing on longer-term trends or short-term price action.
Conclusion:
This indicator provides a dual-layer analysis by combining long-term and short-term perspectives, making it a versatile tool for identifying key highs and lows. Whether you are looking to confirm trend strength or spot potential breakouts, the “Long and Short Term Highs and Lows” indicator adds a valuable visual element to your TradingView charts.
Swing Suite (SMT/Divergences + Gann Swings)Hello Traders!
TRN Swing Suite (SMT/Divergences + Gann Swings) is an indicator which identifies, and highlights pivot points (swings) and prints a lot of information about the swings in the chart (e.g. length, duration, cumulative Delta, ...). Furthermore, it detects divergences in connection with any given indicator, even custom ones. In addition to this, you can choose the algorithm to compute the swings. The famous Gann-Swing algorithm and the extremely precise TRN Swing algorithm (called Standard) are available for selection, as well as two other variants. Compared to other swing or zig-zag indicators it works in real-time, does not need a look-a-head to find swings and is not repainting. Moreover, equal (double) highs and lows are detected and displayed. The TRN Swing Suite helps traders to visualize the pure price action and identify key turning points or trends. The indicator comes with the following features:
Precise real-time swing detection without repainting
Divergence detecting for any given (custom) indicator - with 11 different preset indicators
SMT (Smart Money Technique)/Divergence detecting in relation to other instruments
Swing Performance Statistics
Swing support and resistance levels
Swing trend for multiple swing sizes
Equal/double high and low detection
4 different swing computation styles
Displaying of swing labels, values and information
Customizable settings as well as look and feel
It's important to note that the TRN Swing Suite is a visual tool and does not provide specific buy or sell signals. It serves as a guide for traders to analyze market structure in depth and make well-informed trading decisions based on their trading strategy and additional technical analysis.
Divergence Detection for any given (Custom) Indicator
The divergence detector finds with unrivaled precision bullish and bearish as well as regular and hidden divergences. The main difference compared to other divergences indicators is that this indicator finds rigorously the extreme peaks of each swing, both in price and in the corresponding indicator. This precision is unmatched and therefore this is one of the best divergences detectors.
The build in divergence detector works with any given indicator, even custom ones. In addition, there are 11 built-in indicators. Most noticeable is the cumulative delta indicator, which works astonishingly well as a divergence indicator. Full list:
External Indicator (see next section for the setup)
Awesome Oscillator (AO)
Commodity Channel Index (CCI)
Cumulative Delta Volume (CDV)
Chaikin Money Flow (CMF)
Moving Average Convergence Divergence (MACD)
Money Flow Index (MFI)
Momentum
On Balance Volume (OBV)
Relative Strength Index (RSI)
Stochastic
Williams Percentage Range (W%R)
The divergences are colored with vivid lines and labels. Bullish divergences are distinguished with luminous blue lines, while bearish divergences are denoted by striking red lines. Upon detecting a divergence, the colored lines act as a visual indicator for traders, signaling an imminent possibility of a trend reversal. In response, traders can leverage this valuable insight to make informed decisions in their trading activities.
Choose Your Custom Divergence Indicator
Handpick your custom indicator, and the TRN Swing Suite will hunt for divergences on your preferred market and timeframe. Importantly, you must add the indicator to your chart. Afterwards, simply go to the “Divergence Detection” section in the TRN Swing Suite indicator settings and choose "External Indicator". If the custom indicator has one reference value, then choose this value in the “External Indicator (High)” field. If there are high and low values (e.g. candles), then you also must set the “External Indicator Low” field.
In the provided graphic, we've chosen the stochastic RSI as our example, and as you can see, the TRN Swing Suite instantly identifies and plots bullish and bearish divergences on your chart.
Smart Money Technique (SMT)/Divergence detecting in Relation to other Instruments
Smart Money Technique/Tool (SMT) means the divergence detection between two related instruments. The TRN Swing Suite finds divergence in relation to other instruments, e.g. NQ vs ES or BTCUSDT vs ETHUSDT. Just add another instrument to the chart. As representation style you can choose lines or candles/bars. Afterwards, simply go to the “Divergence Detection” section in the TRN Swing Suite indicator settings and choose "External Indicator". If the second instrument is represented as line, then choose this value in the “External Indicator (High)” field. If there are high and low values (e.g. candles/bars), then you also must set the “External Indicator Low” field.
The detection of SMTs can help traders to decide whether the trend continues, or a reversal is imminent. E.g. if the NQ makes a new higher high but the ES fails to do so and makes a new lower high, then the TRN Swing Suite shows a divergence. As a result, the probability is high that the trend will not continue, and the trader can make an informed decision about what to do next.
How to Set Parameters for Divergence Indicators
To begin, access the indicator settings and find the “Divergence Detection”. Look for the "Parameters" sections where you can fine-tune Parameters 1-3. The default settings are already optimized for the oscillators AO, RSI, CDV, W%R, MFI and Stochastic. For other divergence indicators, you might want to adjust the settings to your liking. The parameter order is the same as in the corresponding divergence indicator.
TRN Swing Suite Statistics
Unveil the untapped potential of advanced Swing Statistics! Gain invaluable insights into historical swings and turning points. Elevate your expertise by harnessing this treasure trove of data to supercharge signal reliability, while masterfully planning stop loss and take profit strategies with unrivaled accuracy. Within the TRN Swing Suite lie two powerful statistics, each offering distinct insights to empower your trading prowess.
Swing Statistic
The Swing Statistic comprises of two series, one for up swings (Up) and one for down swings (Down), with values given in points. The columns have the following meaning:
Up or down
# - total number of analyzed swings
Overall ∅ Length - average length of all swings in points
Overall ∅ Duration - average duration of swings in bars
∅ Length - average lengths for custom-defined swing counts
∅ Duration - average durations for custom-defined swing counts
The custom-defined swing count is used to determine the swing length/duration for the last x swings. Note, in the case of well-established assets like Microsoft or Nvidia, which have undergone one or more stock splits, the overall average in column three may deviate significantly from those in column five. That is why column 5 is useful.
Relation Statistic
The Relation Statistic highlights percentages representing the historical occurrence of specific high and low sequences. In the first column (in %), various types of highs and lows are listed as reference points.
For example, the first row corresponds to "HH followed by", where the second column (#) displays the total count of higher highs (HH) considered. The subsequent columns showcase the percentages of how often certain patterns follow the initial HH.
Fields marked in blue represent sequences that occurred in over 50% of cases. The darker the shade of blue in each field, the higher the percentage.
Use Swing Statistics to Validate Stop-Loss and Take-Profit Levels
No matter which signals you choose to trade, consulting Swing Statistics can significantly enhance the reliability of these signals.
For example, when looking for a long entry after a lower low (LL), you can examine the likelihood of a subsequent lower high (LH) or even a higher high (HH). Combining this valuable information with your predetermined Take Profit level allows you to better assess whether your target can be achieved successfully. Additionally, you can add the average up swing length to the lower low for an alternative Take Profit level. Similarly, you can verify the probability of the next low being a higher low (HL) or another lower low (LL) to determine the likelihood of your Stop Loss being triggered. Align the length of the last down swing with the average down swing length for an alternative Stop Loss.
Swing Support and Resistance Levels
Swing support and resistance levels are horizontal lines starting from a swing high or swing low and representing natural support and resistance levels. Price tends to respect this levels one way or another. In most cases, old swing highs and swing lows provide a lot of liquidity to the market. For example, for a swing high there are at least three different market players at work:
Traders put there stop loss above the swing high
Breakout traders go long above the swing high
Turtle soup (reverse) trader go short above the swing high
Swing Trend (Multiple Sizes)
The TRN Swing Suite can display either at the top or at the bottom the prevailing swing trends for the main trend seen in the chart and for two additional swing sizes. This is useful to see the swing trend for medium and bigger swings to get a clear picture of the market.
Getting an Edge with the TRN Swing Suite
The indicator clearly displays up trends, defined as a sequence of higher highs (HH) and higher lows (HL), with green labels and down trends, defined as a sequence of lower lows (LL) and lower highs (LH), with red labels. Equal highs/double tops (DT) and equal lows/ double bottoms (DB) are highlighted in gold.
In addition, the labels show a full stack of valuable information about the swings to maximize your accuracy.
Length
Length percentage in relation to the last swing length
Duration
Time
Volume
Cumulative Delta
In an uptrend the up swings should have higher volume und higher cumulative delta than the down swings. The duration and time for down swings in an uptrend should be shorter than for the up swings.
Use Cases for Swing Detection
Trend Identification
By connecting the swing highs and lows, traders can identify and analyze the prevailing trend in the market. An uptrend is characterized by higher swing highs and lows, while a downtrend is characterized by lower highs and lower lows. The indicator helps traders visually assess the strength and continuity of the trend.
Support And Resistance Levels
The swing highs and lows can act as support and resistance levels. Swing highs may act as resistance levels where selling pressure increases, while swing lows may act as support levels where buying pressure increases. Traders often pay attention to these levels as potential areas for trade entries, exits, or placing stop-loss orders.
Pattern Recognition
The swings identified by the indicator can help traders recognize chart patterns, such as equal high/lows, consolidations, wedges, triangles or more complex patterns like Gartley or Head and Shoulders. These patterns can provide insights into potential trend continuation or reversal.
Trade Entry and Exit
Traders may use TRN Swing to determine potential trade entry and exit points. For example, in an uptrend, traders may look for opportunities to enter long positions near swing lows or on pullbacks to support levels. Conversely, in a downtrend, traders may consider short positions near swing highs or on retracements to resistance levels.
Swing Styles
In addition to the standard swings, you have the flexibility to choose between various swing styles, including ticks, percent, or even the famous Gann swings.
Standard
Gann
Ticks
Percent
Conclusion
While signals from TRN Swings can be informative, it is important to recognize that their reliability may vary. Various external factors can impact market prices, and it is essential to consider your risk tolerance and investment goals when executing trades.
Risk Disclaimer
The content, tools, scripts, articles, and educational resources offered by TRN Trading are intended solely for informational and educational purposes. Remember, past performance does not ensure future outcomes.
MTF Smart Money ConceptsOverview
This indicator displays major elements of Smart Money Concepts and price action trading with multi-timeframes(MTF) and layered market structures with color visualization.
What is Smart Money Concepts?
Smart Money Concepts(SMC) is one of the methodologies to interpret how financial market moves and to analyze it and execute trades, focusing on liquidity and order flow of financial institutions.
Smart money means the funds invested by large financial institutions such as banks, institutional traders/investors, market makers, hedge funds etc. contrary to retail traders/investors' money.
It is important to note that there is no proof or evidence that those institutions move the market as described in Smart Money Concepts.
Personally speaking, it is one of the interpretation of the market and another angle to view the market just like other technical analysis methodologies such as Elliott Wave Principle, Gann Theory, Wyckoff Method and even traditional price action trading.
Importance of MTF Analysis
MTF analysis(a.k.a Topdown analysis) is the foundation to technically analyze charts and the most fundamental skill in trading because lower timeframes are always influenced by upper timeframes where large financial institutions operate.
How to use
This indicator is designed to help traders analyze how the market moves in terms of SMC and price action with multi-timeframes and color visualization of the market structures, which makes this indicator unique and different from other indicators.
There is two key settings that you can use based on your trading style.
1.Upper timeframe selection
You have two options to determine upper timeframe; Auto mode and Manual mode.
When Auto mode selected, upper timeframe will be determined based on chart timeframe as follows.
Chart timeframe => Upper timeframe
1M=>15M
5M/15M=>1H
30M/1H=>4H
4H=>D
D=>W
W=>M
If you select Manual mode, you can fix an upper timeframe.
2.High/low settings
This affects all other settings of the indicator and most importantly designs the market structure.
This is the key setting to determine how you view the market as price action trading is all about highs and lows and story of how highs and lows have been created with the market structure.
You can specify left bars and right bars to identify swing highs/lows and these highs/lows become the basis to design the market structure and determine how SMC elements are displayed.
Example:
Left bar&right bar: 10
You can see bigger wave(magenta line) in the market structure(stepped line).
(Magenta line is a drawn object by manual)
Left bar&right bar: 4
With this setting, you can see smaller wave in the market structure.
Since market moves like wave as there is a lot of wave theories in financial investment/trading industry such as Elliott wave, Wolf wave etc., users can define market structure with this setting depending on what degree of wave they aim to trade.
Functions:
MTF Order Block
Concept
Order block is a block of orders where buying orders and selling orders are accumulated. Order blocks are created when the institutions move the market up and down, temporality placing orders in an opposite direction to the way they want to move, in order to match their own orders with counter-orders.
Visualization by the indicator
The indicator displays both chart timeframe's order blocks and upper timeframe's order blocks(MTF).
You can also select from two options how to display order blocks;
1. Show all order blocks
2. Show strong order blocks only
Note: Strong order blocks mean order blocks created at strong highs/lows. See also strong high/low below.
Alerts can be set when prices reach strong order blocks.
MTF Fair Value Gap(FVG)/Imbalance
Concept
Fair Value Gap(FVG)(Imbalance) is a void generated among three consecutive candlesticks.
FVG(s) is created when the market moves so rapidly generating buy side or sell side order imbalances.
FVG(s) is characterized by price action that prices tend to come back to the area where FVG(s) exists, filling in the space among the candlesticks.
Visualization by the indicator
The indicator displays both chart timeframe's FVG and upper timeframe's FVG.
MTF Liquidity Grab
Concept
Liquidity grab is price action to sweep liquidity for the institutions to move the market.
This price action often happens because the size of their orders is so huge and they need a bunch of counter-orders to match their orders. This is why prices sometimes come to areas where liquidity rest and swipe them before the market goes up/down.
Liquidity visualization
Where does liquidity rest?
The answer is above highs(buy side liquidity) and below lows(sell side liquidity).
Among all highs and lows, swing highs and lows are where liquidity is accumulated the most because swing highs and lows can be created only by the institutions, therefore massive liquidity is indicated.
Visualization by the indicator
The indicator displays liquidity dots so that users can easily identify where liquidity rests and liquidity grab of both a chart timeframe and an upper timeframe.
Alerts can be set when liquidity grab happens.
MTF Strong High/Low
Concept
Strong high/low literally means strong highs and lows among all highs and lows including swing highs and lows.
There is a few different definitions of strong high/low in price action trading and the definition in this indicator is as follows.
Strong high
A high that that breaks higher low or lower low
Strong low
A low that breaks lower high or higher high
Visualization by the indicator
The indicator displays strong highs and lows of both a chart timeframe and an upper timeframe.
MTF Market Structure Visualization
Concept
Market structure is a series of price movement with highs and lows which outlines the way the market directs. It is a basis to see trend occurrence, trend reversal and sideways and analyzing the market structures in multi-timeframes is the most fundamental technical skill in trading/investment.
Visualization by the indicator
The indicator displays market structures of both a chart timeframe and an upper timeframe and provide color visualization depending on bullish and bearish market structures.
The definition of bullish and bearish market structure is as follows.
Bullish market structure
When a price breaks a Lower High or Higher High
Bearish market structure
When a price breaks a Higher Low or Lower Low
Settings
All the functions above, colors and line settings are parameterized and can be turned on/off depending on users’ needs.
———————————————————————————
概要
Smart Money Concepts(SMC)およびプライスアクショントレードにおける重要な要素をマルチタイムフレームで表示することのできるインジケーターです。
相場構造(Market structure)をマルチタイムフレームで表示し、相場構造の強弱を色で可視化することができます。
Smart Money Concepts(スマートマネーコンセプト)とは?
Smart Money Concepts(以下SMC) は金融市場がどのように動くかを解釈し、分析し、取引を執行するための相場理論の一つであり、Liquidity(リクイディティ)および機関投資家のオーダーフロー(注文の流れ)に焦点を置いていることが特徴です。
Smart Money(スマートマネー)とは、銀行や機関投資家、マーケットメーカー、ヘッジファンドといった金融機関が動かす資金を意味し、個人投資家の資金と対をなす概念です。
重要な点は、実際に上記の金融機関がSmart Money Conceptsで語られているような相場の動かし方をしているかどうかを証明する明確なエビデンスはないということです。
個人的には、エリオット波動理論やギャン理論、ワイコフ理論、伝統的なプライスアクショントレーディングの方法論と同様に、マーケットの動きを解釈するための一つの方法論であり、マーケットの動きを別の角度から見る枠組みと捉えています。
マルチタイムフレーム(MTF)分析の重要性
MTF分析はチャートをテクニカルに分析する上での基礎であり、トレードにおいて最も重要なスキルです。なぜなら下位のタイムフレームは上記のような金融機関が資金運用を行う上位のタイムフレームの影響を常に受けるためです。
使い方
このインジケーターは、SMCまたはプライスアクショントレードの観点から、トレーダーがマーケットをマルチタイムフレームで分析することを支援するために開発しています。
相場構造(Market structure/マーケットストラクチャー)を方向性に応じて色で可視化することができるため、視覚的に相場の構造を判断できることがこのインジケータのユニークな点であり、他のインジケーターと異なる点です。
ユーザーのトレードスタイルに応じて、以下の二つの設定を行うことができます。
1.上位足の決定方法
ユーザーは上位足のタイムフレームを決定するにあたり、AutoモードとManualモードを選択することができます。
Autoモードを選択した場合、上位足はチャートのタイムフレームに応じて以下のように決定されます。
チャートタイムフレーム => 上位足タイムフレーム
1M=>15M
5M/15M=>1H
30M/1H=>4H
4H=>D
D=>W
W=>M
Manualモードを選択すると上位足のタイムフレームを固定することができます。
2.High/low(高値/安値) 設定
当設定はインジケーターの他の全ての機能に影響し、また最も重要である相場構造の定義に影響します。
当設定はユーザーがマーケットをどのように見るか(=どの程度の粒度)を決定する重要な設定です。なぜならプライスアクショントレードは、高値、安値とそれらが相場構造をどのように構築してきたかの一連の流れを分析することが全てだからです。
ユーザーは相場構造を決定付けるスイングハイ·スイングローを特定するためのバーの本数を設定することができます。ここで設定した内容が、相場構造を定義し、以下で説明するSMCの要素の表示を決定することになります。
例:
Left bar&right bar(左右のバーの数): 10
この場合、ステップラインで示した相場構造の中に大きな波(マゼンタの波)を見ることができます。
(マゼンタのラインは手動で描いたオブジェクト)
Left bar&right bar: 4
この設定では、上記に比べて小さい波を描いていることが確認できます。
相場理論の中にエリオット波動理論やウォルフ波動といった数多くの波動理論があることからわかるように、相場は波として動きます。どの粒度の波を狙うかというトレーダーのスタイルに応じて、設定を変更することができます。
機能
MTFオーダーブロック
コンセプト
オーダーブロックとは買い注文と売り注文が一連となって蓄積されたオーダー(注文)のブロックのことです。
オーダーブロックは機関投資家が相場を動かす際に、本来意図する方向とは一時的に逆に動かすことで、彼ら自身の注文をマッチングさせるための反対注文を発生させることで形成されます。
インジケーターによる表示
インジケーターはチャートタイムフレームのオーダーブロックと上位足のオーダーブロックの両方を表示することができます。
また、オーダーブロックの表示オプションとして、
1.全てのオーダーブロックを表示
2.Strong(ストロング)オーダーブロックのみを表示
を選択することが可能です。
注: StrongオーダーブロックはStrong High/Lowで形成されるオーダーブロックを指します。(下記参照)
また、オーダーブロック到達でのアラート設定も可能です。
MTFフェアーバリューギャップ(FVG)/インバランス
コンセプト
フェアーバリューギャップ(FVG)/インバランスとは連続する3つのローソク足の間に形成される溝(Gap)のことです。
フェアーバリューギャップはマーケットが非常に早く動いたことにより、買いオーダーと売りオーダーの需給バランスが崩れることによって発生します。
フェアーバリューギャップには、価格がフェアーバリューギャップが発生したエリアまで戻ってくる傾向があるという特徴が存在します。
インジケーターによる表示
インジケーターはチャートタイムフレームのフェアーバリューギャップと上位足のフェアーバリューギャップの両方を表示することができます。
MTF Liquidity Grab(リクイディティ·グラブ)
コンセプト
Liquidity(リクイディティ)とはマネー、つまり注文です。
Liquidity Grab(リクイディティ·グラブ)とは、機関投資家がマーケットを動かす際にLiquidityを取得するプライスアクションのことを指します。
このプライスアクションは、機関投資家が処理する注文サイズが非常に大きいため、自身の注文を出す際に大量の反対注文を必要とすることからしばしば発生します。
これが、価格がLiquidity(注文)の集まっているエリアに接近し、それら注文をスワイプ(狩り取る)した後に上昇·下落する理由です。
Liquidityの可視化
一般的にLiquidityは高値の上(buy side liquidity)、安値の下(sell side liquidity)に存在します。
全ての高値·安値の中で、スイングハイ·ローがliquidityが最も蓄積されているエリアということができます。なぜならスイングハイ·ローは機関投資家の注文によってのみ形成されるからです。
インジケーターによる表示
ユーザーがLiquidityポイントを簡単に識別できるようにLiquidityをドット表示することが可能です。またチャートタイムフレームと上位足の両方のLiquidity Grabを表示することができます。
Liquidity Grab発生時にアラートも設定可能です。
MTF Strong High/Low(ストロングハイ·ロー)
コンセプト
Strong high/lowは文字通り、強い高値·安値のことを指します。
トレーダーの間でいくつかの異なる定義が存在しますが、当インジケーターでの定義は以下の通りです。
Strong high
Higher low(ハイアーロー) または Lower low(ロワーロー)をブレイクした高値
Strong low
Lower higher (ロワーハイ) または Higher High(ハイアーハイ)をブレイクした安値
インジケーターによる表示
チャートタイムフレーム、上位足のStrong High/Lowを表示することが可能です。
相場構造可視化
コンセプト
相場構造(Market structure/マーケットストラクチャー)とは、相場の流れを成り立たせる高値と安値を元にした一連の値動きです。建物における骨組みに該当します。
トレンドの発生、転換、レンジを見極めるための基礎であり、マルチタイムフレームで相場構造を分析することは、投資·トレードにおいて最も重要なテクニカルスキルです。
インジケーターによる表示
チャートタイムフレームと上位足タイムフレーム両方の相場構造を表示することができます。
また、相場構造が強気の状態か弱気の状態かを色で可視化するため、上位足含めた相場の流れを視覚的に判断することが可能です。
相場構造の強弱の定義は以下の通りです。
強気の相場構造(Bullish market structure)
価格がLower HighまたはHigher Highをブレイクしたとき
弱気の相場構造(Bearish market structure)
価格がHigher LowまたはLower Lowをブレイクしたとき
設定
上記の全ての機能は色やライン設定含めパラメーターで設定が可能です。またユーザの必要に応じて表示·非表示を切り替えることができます。
Poor ReversalsPoor Reversals Indicator
This indicator finds Poor Reversals. Poor reversals are reversals in price with consecutive highs or lows that are close together. Look for the different types of highs and lows. Some say candle patterns don't matter, but they forget it's the orderflow that makes the pattern. Find poor, tweezer, and 1 tic rejections and study what happens next. We don't need to read the depth of market to see what the orderflow is saying. They are called poor because the auction didn't run its course. It didn't continue the direction until all activity in that direction was exhausted. Proper reversals create excess. Excess is a long tail/wick. A proper reversal leaves a long tailed excess unfilled.
The different highs and lows give clues to what kind of orderflow happened there. The difference between them is which high or low happened first. Price does often come back to these areas and clears them up with a proper reversal. We can see them on all timeframes. Knowing what they mean in the orderflow helps with reading charts.
The Poor Reversals are:
Poor
1 Tick Rejection
Tweezer
When looking at 2 bars that have very close high or lows, there are a few different types. They are each poor and can be further defined as each are price action clues.
If next low is higher, it's a poor low
If next low is lower, it's 1 tic rejection
If next low is equal, it's tweezer bottom
If next high is lower, it's a poor low
If next high is higher it's 1 tic rejection
If next high is equal it's tweezer bottom
Poor Highs and Lows:
The high or low comes first. The next bar does not go past it. Poor highs and lows are often created from price exhaustions. This means at poor highs buyers are trapped. At poor lows sellers are trapped. Price ran out of steam to continue in that direction. There wasn't enough activity and participation to continue the auction in that direction.
Poor lows are defined when 2 lows are very close, and the 1st bar is lower. The 2nd comes very close to a new low. It happens most when shorts, at the moment, "run out of steam". They were "too aggressive" and got themselves "short in the hole". When a poor low is made, price will bounce because shorts are buying to protect profits.
Poor highs are defined when 2 highs are very close. The 1st bar is higher. The 2nd comes very close to a new high. It happens most when longs, at the moment, "run out of steam". They were "too aggressive" and got themselves "long in the tooth". When a poor high is made, price will pullback because longs are selling to protect profits.
1 Tick Rejections:
The high or low comes last. The next bar goes just a little bit beyond it. A "1 tic rejection" happens when a new low is made and quickly rejects. The name is misleading. It doesn't have to be "1 tic". Different markets have different measurements. For ES, it's less than 8 tics. For NQ, it's about 5-20 points. It varies depending on relative market volatility.
1 Tick highs are defined when 2 highs are very close, and the 1st bar is lower. This happens when longs are aggressive and drive price up. Price makes a newer high and longs rapidly start taking profits. Their selling activity drives price lower. In the orderflow, longs likely closed at the same time new shorts sell. This competition to sell drives price lower. At the high, it says longs saw it wouldn't go higher and they took rapid exit.
1 Tick lows are defined when 2 lows are very close, and the 1st bar is lower. This happens when shorts are aggressive and drive price down. Price makes a newer low and shorts rapidly start taking profits. Their buying activity drives price higher. In the orderflow, shorts likely closed at the same time new longs buy. This competition to buy drives price higher. At the low, it says shorts saw it wouldn't go lower and they took rapid exit.
Tweezer Tops and Bottoms
The highs or lows of the bars are equal. Tweezers most often mean that an aggressive trader is influencing price. They drove price in one direction and then quickly reversed sentiment. Tweezers most often happens in stop hunts. An aggressive trader found where the stops were located and then entered an aggressive order to turn the market.
Tweezer Tops are defined when 2 highs are equal. The first bar sets the high. The second bar matches the high. This happens when there is an active seller entering. It could be simple profit taking from longs or new aggressive shorts. In bull trends, price will move up to find short stop. When the stops are found, the market reverses sharply lower.
Tweezer Bottoms are defined when 2 lows are equal. The first bar sets the low. The second bar matches the low. This happens when there is an active buyer entering. It could be simple profit taking from shorts or new aggressive longs. In bull trends, price will move up to find long stops. When the stops are found, the market reverses sharply higher.
Poor Reversals can be poor, 1 Tick Rejections, or Tweezers. They are all considered poor and upon further investigation we can see they are created from different conditions in the orderflow. They are not called Poor Reversals because they are weak. They are called poor because of the action that happened there. One side got caught in a bad position. Other sharks in the market smelled blood and ripped them apart.
This indicator is a work in process. While the concepts are great for real time trading, this indicator is not designed to be used in real time trading. It will repaint based on the bar close. The purpose of this indicator is to train our brains to see these nuances on candle charts. Some say candle patterns don't matter, but they forget it's the orderflow that makes the pattern. We must make split second decisions and knowing the context behind the orderflow reduces response time. These poor reversals don't have to retest, and the best ones won't come back. I use these concepts to find exits, where my trades might be wrong, confirmation I'm on the right side. It's amazing how these simple nuances can turn the markets. But sure enough, they do. Check them out in all time frames.
It's a fun indicator to play with. Some markets do require tweaks to the “Ticks” setting. Too big and charts will be noisy. Too low and not much will show up. A general rule of thumb is more volatile markets need higher tick values while less volatile need lower Tick values. Higher timeframes are also more reliable than lower time frames. I've included some customizable settings and I plan on adding more in the future. Enjoy!
Tug-of-War Fast/Slow Technical IndicatorThe script Tug-of-War (ToW) Fast/Slow has a couple of lines (red and purple) and areas (purple and greenish) which give the trend. It also has one line (blue) and dots (green) that give the up-and-down swing.
HOW THE INDICATOR WORKS
It is based on moving averages run on normal OHLC bars, Heikin Ashi bars as well as customized bars (which modify the open/high/low/close values similar to how Haikin Ashi bars do). These moving averages are weighted by volume and related to each other (for example differences are calculated) to produce the final lines. Since the script requires volume, it may not work for tickers which don't have volume (however for some tickers the script uses a proxy-volume so that they work; for example it uses the SPY volume for VIX). There is a different but similar script that I'll be publishing (ToW Simple) which doesn't use volume and runs on any ticker.
HOW TO SETUP THE INDICATOR
The indicator can be run on "close" prices as well as "open", "high", "low" and several mini-max modes ("MM ..."). They pick highs and lows (minim and maxim values, hence the mini-max name) to generate the indicator lines. See the drop down box options under "Adjust Close Type" (the very fist options in the script settings). The multiple MM modes use different formulas to calculate the mini-max values. The more significant MM modes are MM ZZ (zig-zag), MM HL/HL (determines highs and lows based on highs and lows), MM HL/C (determines highs and lows based on close) and MM Close. Note: if the MM ZZ mode show you the highs for the current bar and you actually want the lows (or vice versa) check "MM ZZ Reverse".
The indicator has two fast lines:
the green dots (called F1 since it's the 1st Fast line, actually dots)
the blue line (called F2--the 2nd Fast line)
They are called "fast" because they move up and down faster. In previous iterations of the script I called them "swing lines" since they capture the prices swing up and down. The blue line is the more significant one (since the green one I set, by default to dots instead of an actual line).
The indicator has two slow lines:
the purple line (called S1 since it's the 1st Slow line)
the blue line (called S2--the 2nd Slow line)
They move slower than the fast line and they are better at determining the trend.
The order of lines, from fast to slow, is: F1 (green), F2 (blue), S1 (purple) and S2 (red).
The indicator also has two areas:
the greenish area (called FA since it's the Fast Area)
the purple area (called SA since it's the Slow Area)
Additional lines (but less significant are displayed if you uncheck the "Clean look" option).
The script allows to display up to for sets of lines (see the top "Adjust Close Type (Set #)" options). For example one set may show "Highs" and the other "Lows" or "Close" and "MM HL/HL". Additionally it can run in multi-set mode when it shows the chosen one line (F1, F2, S1, S2, FA, SA) for each OHLC (open, high, low, close). See "Only Show Related Lines" option. In this display purple is the line for Open, green is the line for High, red is the line for Low and black is the line for Close.
The indicator also has a custom mode (see the "Enable custom bars" checkbox and the options following it). With it you can change the open/high/low/close value (see "Custom #1 OHLC to Modify") of a bar ("Custom #1 Index To Modify" determines which bare to modify, 0 being the most recent bar). Then "Custom #1 Modifier Type" specifies to use open/high/low/close value of the same or different bar (use "Custom #1 Modifier Index/Value ..." to choose which bar's OHLC value to use for the custom value; 0 means the O/H/L/C value of the same bar as the one being modified; 1 means previous bar, etc.). If "Custom" is selected instead (under Modifier Type) then you can enter the custom value in the "Custom #1 Modifier Index/Value ..." field. This will show you how the indicator lines look like if the price was different. Three different bars can be modified this way. You can try different custom values and see for what price value one of the lines reaches a high or low point. That is an estimate of how far the price may go. Note: the indicator values depends depends on all OHLC values (plus volume) not just on the one chosen. That is, if the indicators is based on close values it is still affected to some extent by high, low and volume. Therefore the price value determined using the custom mode may not be exact but only a rough estimate (and the bigger changes in OHLC the bigger affect on the indicator and the actual price may not be exactly what was calculated using the custom mode.
HOW TO USE THE INDICATOR
Strategies and tools that apply to price such as resistance and support levels and trend lines, pitchforks (particularly Schiff pitchforks in case of the indicator) also apply to these lines. Because the indicator lines are within a range it is generally easier and faster to see and find such support/resistance levels and trend lines.
Additionally, the lines or the areas crossing the 0 line often indicate a change in trend (however if earlier indicator highs/lows bounce off around the 0 line that may happen this time around as well). The more significant 0 crossing is for the slow lines (red first and then purple) as well as the areas.
The slow lines and the areas, as mentioned already, show the trend (in previous iterations of the indicator I called them direction lines).
The fast lines (blue line, green dots) show the swing, as mentioned earlier. They often swing up and down. When they reach a high (you can thin of it as overbought) they may move back down on the next bar (or vice-versa when reaching a low). However, sometimes they don't swing but rather move in a line closer to a straight line (more like the slow lines). That indicates that the trend is stronger.
The fast lines can also indicate the trend by looking if their highs and/or lows are trending up or down. Thus, if the highs and lows are trending down then it's likely the price will go down.
Another thing to look at is divergence between the price and the slow lines or the high/lows trend of the fast lines (that I mentioned above). If the price is going up but the these are trending down then over the same bars then the price may be coming closer to a reversal.
STRATEGIES
Swing-in-trend. Find a ticker with the slow lines showing an upward trend (i.e., the red line crossing 0 or being above 0) and a the slow line (such as the blue line) reaching a previous low level (draw support levels and/or trend lines to determine that). Go long when the fast line reaches the support level or bottom trendline. The expectation is that the price will move up by the close of the next bar (when the position should normally be closed). The "go-short" setup is just reversed (slow lines trending down and the fast lines reaching high levels). You can use the "High", "Low", "MM ZZ" or one of the other MM modes instead of "Close" to get a better entry and exist point (in this case you enter when the the "Low" or "MM ZZ" modes reached a low and you enter if the "High" or "MM ZZ" reached a high or else exit at close of the next bar).
Trend-on-swing. When the red line is about to cross or just crossed the 0 line and wait for the swing line to go down first (you can use "High", "Low" or an MM mode, as explained dabove, for a better entry point) and then you enter the position and exit when either the slow (red) line reaches a resistance level, it crosses 0 the other way or when the fast line reaches a very high resistance level. This strategy will take longer, it won't be closed on the next bar.
Mini-max strategy. This is a new strategy I've developed. It uses MM ZZ mode (and a second MM ZZ set to "reverse") as well as "High", "Low" and "MM HL/HL" mode. I basically draw resistance and support lines on these, usually 2-3 lines for high and the same for low, for multiple tickers that seem a good match (they show a nice, consistent up/down pattern for MM ZZ). When the F2/blue lines reaches one of the horizontal lines further from the 0 lines (I setup alerts for this), then I enter expecting a move in the opposite direction. If it reaches the 2nd or 3rd low horizontal line then I go long. Then on the next bar when the F2 line reaches the 1st high horizontal line then I close the position (alternatively, I close half and keep half for when the second high horizontal line is reached). Alternatively, I may close the same bar, when the reversed MM ZZ setup reaches the 1st high horizontal line. I usually use this setup on weekly charts and use weekly options but it can be used on other charts such as daily charts as well.
I recommend to setup alerts on the indicator. After you draw a horizontal line or a trend line and you select it, its bar has a clock icon with a "+" sign. If you click on it you can setup an alert. In the setup dialog, under "Condition" select the indicator and then select the line of the indicator (such as "F2 (f_s/Blue)") then select "Once Per Bar" under "Options" (that's my recommendation, it will alert you only one time per bar). Finally customize the message for example: "ZZ: F2/blue /lo hl 1/3, TQQQ, 1D" (which means it's for MM ZZ mode when F2 (blue) line intersects the 1st (out of 3) low horizontal line (HL) and it's for TQQQ on 1D chart. When I use the reverse mode for ZZ then I write: "ZZr: ..."
In the chart above, the first indicator shows the "Close" mode and the second the "MM ZZ" mode (along with 2 levels for high and low).
Smart Money Concepts [Kodexius]Smart Money Concepts is a price action framework designed to integrate market structure, liquidity behavior, and inefficiencies into a single, readable view. Rather than acting as a signal generator, it serves as a live market map highlighting where price has displaced, where liquidity may be resting, which zones remain valid, and how that context updates as new candles print.
What separates this script from typical “SMC bundles” is not the presence of familiar concepts like swings, order blocks, FVGs or liquidity sweeps. The value is in the engine design and how the components are maintained together as a consistent state, with automatic pruning and prioritization so the chart stays usable over time. Many tools can draw boxes, but fewer tools manage the lifecycle of those zones, reduce overlap, rank relevance, and keep the display focused on what still matters near current price.
At the core is a structure model that tracks directional state and labels structural transitions as they happen. CHoCH and BoS are not just printed whenever price crosses a line. Each event is anchored to a swing reference and handled in a way that reduces repeated triggers from the same context, helping you see genuine transitions versus minor noise. This gives structure a “narrative” across time instead of a cluttered sequence of identical labels.
Order blocks are built from the most relevant candle within the post break window and displayed as true zones that extend forward while they remain valid. Beyond the zone itself, the script adds context that is usually missing in basic OB implementations: a volumetric pressure visualization and a displacement strength score that is normalized and ranked over a rolling window. In practice, this creates an information hierarchy. You can quickly see which zones carried more participation, whether the internal push was dominated by buying or selling pressure, and whether the move that created the zone had meaningful displacement relative to recent history. This is designed to help prioritization, not to claim prediction.
Imbalances are handled as a dedicated module with multiple detection modes (FVG, VI, OG, IFVG) and optional MTF logic so you can map inefficiencies from a higher timeframe while executing on a lower timeframe. Each imbalance is displayed as a zone with a midline reference, and mitigation behavior can be tuned (wick or close). IFVG adds lifecycle depth by tracking inversion behavior rather than simply deleting the zone, which can be useful for monitoring how price rebalances and flips inefficiencies over time. An optional sentiment style internal fill is available for visual context, but it is intentionally framed as informational rather than a “buy/sell meter.”
Liquidity is treated as an event driven layer. Pivot highs and lows are tracked as potential liquidity pools, then monitored for sweeps and rejection behavior. If you enable EQH/EQL logic, the script can label equal highs and lows during the sweep process to highlight common resting liquidity formations. A volume filter is available to reduce low quality levels, aiming to keep the liquidity map focused on swings that occurred with meaningful participation rather than every small fluctuation.
Swing Failure Patterns (SFP) are included as a separate confirmation style tool that focuses on rejection after liquidity is taken. The module supports optional volume validation using lower timeframe volume distribution outside the swing level, which helps filter some low quality SFPs on noisy instruments. The output is a cleaner set of events intended to complement structure, liquidity and zones, not replace discretionary decision making.
For higher timeframe context, the HTF candle projection panel can display a compact set of higher timeframe candles to the right of current price, with classic or Heikin Ashi style and configurable sizing, spacing and labels. This allows you to maintain HTF awareness without switching charts, which is especially helpful when structure and zones are being interpreted across multiple timeframes.
Finally, the alert framework is designed around well defined structural and zone states. Alerts cover structural shifts (CHoCH, BoS), liquidity sweeps, new and broken order blocks, breaker behavior (if enabled), new and approached imbalances, premium and discount entries, trendline events, and SFP detection. These alerts are intended as monitoring prompts so you can review context, not as automated trade execution signals.
Every major component is modular and configurable. You can run a minimal structure only layout or enable a full framework with zones, imbalances, liquidity, SFP and HTF projection. The guiding principle is chart clarity and relevance: keep the most important information visible, reduce overlap and stale objects, and maintain a consistent view of how price is interacting with liquidity and value over time.
🔹 Features
🔸 Market Structure Engine (CHoCH and BoS)
This script automatically tracks zigzag based market structure and differentiates between:
CHoCH (Change of Character) : the first meaningful structural shift that suggests the prior directional leg is weakening.
BoS (Break of Structure) : continuation breaks that confirm structure extension in the active direction.
Instead of relying on plain pivot dots, our market structure swings are built with a lightweight zigzag style engine that tracks direction and “locks in” the true leg extreme only when the leg flips. This produces cleaner, more consistent swing highs/lows for BOS/CHoCH than simple left/right pivot checks.
Bullish CHoCH:
Bearish CHoCH:
Bullish BoS:
Bearish BoS:
🔸 Order Blocks with Volumetric and Displacement Insight
The script identifies recent bullish and bearish order block zones around meaningful structural reactions and keeps the display focused on the most relevant areas. Instead of drawing a static rectangle and leaving it there forever, each zone is maintained as an active region on the chart and can be limited by a user defined visibility depth to avoid clutter. When enabled, the overlay also adds compact volume based context inside the block so you can quickly compare relative participation between recent zones and see whether the origin move showed strong follow through versus a softer transition. The intention is to provide structured context and cleaner prioritization on the chart, not to present a trade call or a guaranteed reaction level.
Bullish Order Block:
Bearish Order Block:
Order blocks are derived from the structure shifts, marking the institutional “origin zone” behind a decisive move and projecting it forward as a live area of interest. In practice, it highlights the candle cluster where price last rebalanced before expanding away, so you can track potential retests with context instead of guessing.
Inside each order block, the internal bars act as a compact strength meter green vs red summarizes the relative bullish vs bearish participation, while the blue segment reflects the “departure force” (displacement/momentum) away from the zone. It’s meant to help you scan which blocks left clean and strong versus those that moved out more slowly or with mixed pressure.
🔸 Breaker Blocks & Mitigation Tracking
Tracks when previously identified order blocks fail and converts them into breaker blocks, visually marking a change in how price is interacting with that zone.
Bullish Breaker Block :
Bearish Breaker Block :
Separate handling of bullish and bearish breakers with clear color differentiation.
Includes optional “mitigation” logic using either wick or close to determine when a block is considered broken or mitigated.
Breaker blocks are updated and removed dynamically as price trades through them, keeping the chart focused on current, active zones.
🔸 Imbalances
The imbalance module maps common price inefficiencies as zones, with support for multiple detection styles such as Fair Value Gaps, volume style imbalances, opening gaps, and an inverted gap mode. Each imbalance is drawn as a practical area on the chart with a midpoint reference, so you can quickly see where price may be revisiting unbalanced movement. You can also choose how mitigation is evaluated (wick or close) and optionally run imbalance detection on a separate timeframe for cleaner higher timeframe context while staying on your execution chart.
Fair Value Gaps:
Inverse Fair Value Gaps:
Opening Gaps:
🔸 Liquidity Sweeps, EQH/EQL, and Optional Volume Filter
Liquidity levels are derived from swing highs and lows and then monitored for sweep behavior, where price trades beyond a prior level and rejects back. If you enable EQH/EQL marking, the script can highlight equal highs and equal lows behavior around those liquidity areas to make common pool formations easier to spot. An optional volume filter can be used to reduce tracking of low participation swings, helping keep the liquidity layer focused and less noisy on instruments that produce frequent small pivots.
Sellside Liquidity Sweep Definition:
Buyside Liquidity Sweep Definition:
Highlights equal highs (EQH) and equal lows (EQL) when sweeps occur, marking where price probed above/below prior liquidity and then rejected.
Optional volume filter to ignore low volume swings and focus on more meaningful liquidity zones.
🔸 Premium, Discount, and Equilibrium
The premium and discount view provides a simple contextual map of where price is trading within a measured range, alongside an optional equilibrium line as a midpoint reference. This is intended as a higher level framing tool to help you avoid treating every price location the same, especially when combining structure with reaction zones. Price labels can be enabled for quick orientation, and the display updates as the underlying range evolves.
Projects premium and discount bands based on a dynamically measured range, offering a simple view of where price is trading relative to that range.
Draws separate Premium and Discount boxes with optional price labels for quick orientation.
Optional mid line (equilibrium) to visualize the “50%” of the current range, often used as a reference for balanced versus extended price.
Zones auto update as the underlying range evolves, with logic to prevent stale levels from cluttering the chart.
🔸 Trend Channels
When enabled, the trend module draws swing based diagonal structure using trendlines and a channel style visualization. You can tune sensitivity and choose whether the source should be depending on how you prefer to read trend behavior. The channel is maintained dynamically so you can keep directional context without manually drawing and constantly adjusting diagonal lines, and the script can highlight basic break behavior when price pushes beyond the active diagonal reference.
🔸 Swing Failure Pattern (SFP) Detector
The SFP module highlights common swing failure behavior, where price briefly trades beyond a swing level and then reclaims it, often reflecting a liquidity grab followed by rejection. Bullish and bearish SFPs can be enabled independently, and the display is designed to keep the key level and the rejection visible without excessive clutter. Optional volume validation can be used as a filter, so you can choose whether you want the detector to be more permissive or more selective based on participation characteristics.
🔸 HTF Candle Projection Panel
The HTF panel projects a compact set of higher timeframe candles to the right of price, giving you higher timeframe context without switching charts. You can select classic candles or Heikin Ashi style, adjust the scale and spacing, and optionally display reference lines and labels for OHLC values. This is a visual context tool intended to support multi timeframe reading, not a replacement for your own higher timeframe analysis.
In addition to projecting higher timeframe candles, the HTF panel can also detect and visualize higher timeframe liquidity sweeps directly within the projected candle set. The script monitors each completed HTF candle’s high and low and evaluates subsequent HTF candles for sweep behavior i.e., when price briefly trades beyond a prior HTF extreme but fails to hold acceptance beyond it (filtered using the later candle’s body positioning). When a sweep is detected, the panel draws a dotted sweep line and marks the event, allowing you to spot HTF stop runs and failed breaks without switching timeframes. Sweeps are dynamically invalidated if a later HTF candle shows genuine acceptance beyond that level, ensuring the display stays context relevant and avoids stale markings. This turns the HTF projection from a passive visualization into an actionable context layer for identifying HTF liquidity events while executing on lower timeframes.
🔸 Alerts
Alerts are included for the most practical events produced by the overlay, such as structure shifts (CHoCH and BoS), liquidity sweeps, new and invalidated zones, price approaching recent zones, imbalance creation and mitigation, premium or discount entries, trendline events, and SFP detections. The alerts are designed to function as a monitoring layer so you can be notified when something changes in your mapped context, rather than acting as standalone trade instructions.
🔸 Originality & Usefulness
This script is not a collection of separate SMC drawings layered on top of price. It is built as a unified price action engine where market structure, order blocks, inefficiencies, and liquidity are produced from the same evolving state. That matters because most SMC indicators treat these concepts as independent overlays, which often leads to contradictory markings and excessive clutter. Here, the design priority is consistency and readability: modules update in sync, older elements are managed, and the chart stays usable during live conditions.
A key differentiator is the internal swing logic, which functions like a compact zigzag style structure engine. Instead of reacting to every minor fluctuation, it aims to focus on meaningful swing decisions and treat structure as a sequence. This reduces repetitive labeling and makes structural transitions easier to follow. Structure events are anchored to the swing that defined them and are designed to trigger in a clean, non spammy way, which is critical for anyone who uses structure as a workflow backbone.
The structure layer is intentionally narrative oriented. It separates a transition event from continuation events, so CHoCH is used to highlight the first meaningful shift after an established leg, while BoS is used to mark follow through in the same direction. This is not a prediction claim. It is a clarity feature that helps users read “phase changes” versus “continuation” without constantly second guessing whether the script is just printing noise.
Order blocks are where this script becomes especially distinctive compared to typical SMC tools. Instead of drawing identical rectangles, each block is rendered with an internal gauge that communicates participation and directional dominance at a glance. The zone is visually segmented to reflect bullish and bearish pressure components, and it also carries a volume readout plus a relative weight compared to other recent blocks. This creates a ranked view of blocks rather than an unfiltered pile. In practice, you can prioritize zones faster because the script surfaces which blocks had more meaningful participation and whether the internal push looked one sided or mixed. The result is less subjective filtering and a cleaner chart.
Imbalances are handled as structured inefficiency zones with clear references and optional context. Beyond drawing the zone and midpoint, the script can overlay a sentiment style gauge that divides the imbalance into bullish and bearish portions and updates as new data comes in. The practical value is that you can see whether an inefficiency remains strongly one sided or is gradually being balanced. This turns imbalances from static boxes into a living context layer, which is particularly useful when you monitor reactions over time instead of treating every touch the same.
Liquidity is treated as an event driven tracking system rather than simple pivot plotting. Liquidity pools are identified from swing behavior and can be gated through a participation filter so the script focuses on levels that formed with meaningful activity rather than low quality noise. Once tracked, levels are monitored for outcomes like sweeps and equal high/low behavior, and then updated or retired when they are decisively resolved. This prevents the display from accumulating stale levels and keeps the liquidity layer focused on what is still relevant now.
Swing failure patterns are integrated as selective events rather than continuous spam. The intent is to produce fewer but more structurally meaningful SFPs, aligned with the liquidity narrative, instead of printing clusters around the same price area. This keeps the pattern readable and reinforces the “event based” design philosophy across the script.
Higher timeframe context is supported through a compact HTF projection panel that provides quick orientation without forcing constant timeframe switching. It lets you see where current price action sits inside a larger timeframe candle and range, which helps maintain consistency when you are executing on a lower timeframe but respecting higher timeframe structure.
Disclaimer: This indicator is for educational and analytical purposes only. It does not provide financial advice, and it does not guarantee results.
🔹 How to Use
This tool is designed to support multiple trading styles, but it is most effective when you treat it as a top down mapping and decision support tool. A practical workflow looks like this.
1) Establish higher timeframe bias and context
Start on your reference timeframe such as H4 or Daily and read the market’s dominant story first. Use the Market Structure Engine to identify whether the market is in continuation mode or transition mode. The goal is to avoid executing lower timeframe ideas that conflict with the larger structure narrative.
Use the HTF Candle Projection Panel as a fast orientation aid. It helps you judge whether current price is building acceptance near the highs of the larger candle, rotating back toward its open, or rejecting from its extremes. This is especially useful when you execute on lower timeframes but want to stay aligned with higher timeframe positioning.
Add Premium and Discount framing to understand location. When price is trading in premium, continuation longs are often more selective and require stronger confirmation, while shorts may have better location if structure supports it. When price is in discount, the opposite applies. Treat this as location context, not a rule.
2) Map your key reaction zones with prioritization
Next, build your map of where reactions are most likely to occur. Enable Order Blocks with Volumetric Insight to highlight the most relevant origin zones that form after important structure events. Keep your focus on the most recent blocks and adjust the visible depth so the chart stays clean.
Use the internal gauge and participation readouts to prioritize. Instead of treating every zone as equal, treat higher participation blocks as primary candidates and lower participation blocks as secondary. The bullish and bearish split inside the gauge helps you quickly judge whether the zone formed from a clearly one sided push or a more mixed move, which can inform how strict you want to be with confirmation on a retest.
If you use Breaker Blocks, treat them as role shift zones. They are especially useful when the market has clearly transitioned and you want to track where a previously defended origin area may become a meaningful retest level later.
3) Layer in inefficiencies only where they add clarity
If your workflow includes imbalances, add them selectively to avoid visual overload. Use Fair Value Gaps, Volume Imbalances, or Opening Gaps as secondary reaction areas that often sit inside, near, or between larger zones.
If you enable the internal sentiment gauge, read it as context rather than a signal. It is meant to help you see whether the imbalance remains one sided or has started to balance out as price develops. A strongly one sided presentation can support the idea of continuation through the zone, while a more balanced presentation can support the idea of deeper mitigation or chop. Use it to refine expectations, not to force entries.
4) Track liquidity as events, not as static levels
Enable Liquidity Sweeps and EQH/EQL tagging to highlight where resting liquidity is likely concentrated and when it gets taken. The main value here is narrative: you can see when price runs obvious highs or lows and whether it immediately rejects back into structure or accepts beyond the level.
If you use the volume filter, treat it as a quality gate. The point is to ignore small, low participation swings and keep the liquidity layer focused on levels that formed with meaningful activity. This tends to reduce noise and makes sweeps and equal level behavior more relevant.
Combine the liquidity layer with the Swing Failure Pattern detector to isolate moments where liquidity is taken and then rejected. The cleanest use is when SFPs occur at or near your pre mapped reaction zones, after a sweep, and in alignment with your higher timeframe bias.
5) Refine execution timing on your entry timeframe
Drop to your execution timeframe and use local structure shifts as timing tools. CHoCH and BoS on the lower timeframe can help you see when micro structure is flipping in your intended direction after price interacts with your mapped zone.
If you use the Trend Channel framework, treat it as diagonal context rather than strict support and resistance. A channel helps you see where price is riding the trend and where it is deviating. This can help you time entries by waiting for price to re enter the corridor, show rejection near a boundary, or confirm a shift by building structure outside the channel.
A common practical sequence is: price reaches a mapped OB or imbalance area, liquidity gets taken, price rejects, micro structure begins to flip, and then you execute with your own confirmation and risk rules. The tool helps you see each step clearly, but your plan determines what is sufficient confirmation.
6) Use alerts as monitoring, not as standalone signals
Set alerts only for events that are meaningful to your workflow, such as:
-fresh CHoCH or BoS in your preferred direction
-new or invalidated order blocks and breaker blocks
-price approaching the most recent priority zones
-liquidity sweeps and EQH/EQL interactions
-new SFP events
-entry into premium or discount and interaction with HTF projection levels
-imbalance creation, mitigation, or approach
Treat alerts as prompts to check the chart, not as automatic entries or exits. This script is designed as a mapping and decision support tool. Trade execution, confirmation, and risk management remain entirely dependent on your own strategy and discretion.
🔴 Price Action Practical Notes
💠 Market structure
Market structure is the framework used to describe how price organizes itself into swings. It is built from successive swing highs and swing lows, and it is used to decide whether the market is expanding upward, expanding downward, or transitioning. A practical structure model focuses on “meaningful” turning points rather than every minor fluctuation, because the goal is to capture intent and flow, not noise.
💠 Swing highs and swing lows
A swing high is a local peak where price stops advancing and begins to rotate lower, while a swing low is a local trough where selling pressure pauses and price rotates higher. Swings matter because many traders anchor risk, liquidity, and entries around them. The stronger the reaction away from a swing, the more likely it is to be referenced again as a decision point.
💠 Break of structure
A break of structure is the event where price decisively exceeds a prior swing in the direction of the prevailing move. In practice, it is used as confirmation that a directional leg is still active and that liquidity resting beyond the swing has been taken. This concept is less about predicting and more about validating continuation.
💠 Change of character
A change of character is a structural break that signals transition rather than continuation. Instead of breaking a swing in the same direction as the recent trend, price breaks a key swing in the opposite direction, suggesting that control may be shifting. It is often treated as an early warning that the market may be moving from continuation into reversal or deeper pullback conditions.
💠 Order blocks
An order block is commonly described as the last opposing candle or consolidation zone that precedes a strong directional expansion. The idea is that this area represents a footprint of aggressive execution and unfilled interest. When price revisits it later, it can act as a reaction zone because participants who missed the move may defend it, or because remaining orders may still exist there.
💠 Mitigation and invalidation of a zone
Mitigation describes the process of price returning to a zone and “consuming” the remaining interest there. A zone is typically considered invalidated when price trades through it in a way that implies the resting orders were absorbed and the area no longer has protective value. Some approaches treat a wick through the boundary as enough to invalidate, while others require a candle close beyond the boundary to confirm that the level has truly failed.
💠 Breaker blocks
A breaker block is an order block concept that changes role after being invalidated. When a previously respected zone fails, it can later become a reaction area in the opposite direction because trapped participants may use the retest to exit, or because the market may recognize it as a new supply or demand reference. Breakers are often treated as “failed zones that become liquidity magnets” and are closely watched on retests.
💠 Liquidity and liquidity pools
Liquidity is the availability of resting orders that allow large transactions to execute with minimal slippage. In chart terms, liquidity pools often form around obvious swing highs and lows, equal highs and lows, and clear ranges. These areas attract price because they contain clustered stops and entries that can be used to fuel continuation or trigger reversals through rapid order flow shifts.
💠 Liquidity sweeps
A liquidity sweep is a move where price briefly trades beyond a known liquidity pool and then returns back inside, often closing back within the prior range. The concept implies that stops were triggered and liquidity was captured, but that continuation beyond the swept level did not sustain. Sweeps are frequently used as context for reversals or for confirming that a “cleanout” occurred before a directional move.
💠 Equal highs and equal lows
Equal highs and equal lows describe repeated swing levels that form a flat or nearly flat top or bottom. They matter because they concentrate liquidity. Many traders place stops just beyond these repeated levels, and many breakout traders place entries around them. The result is a dense cluster of orders that can be targeted efficiently by price.
💠Imbalances and inefficiencies
Imbalances represent zones where price moved so quickly that it left behind inefficient trading, meaning fewer transactions occurred in that region compared to surrounding areas. The underlying idea is that markets often revisit these areas to rebalance, fill gaps, or complete unfinished business. Imbalances are treated as areas of interest for pullback entries, targets, or reaction zones.
💠 Fair value gap
A fair value gap is a specific form of imbalance commonly framed as a three candle displacement that leaves a gap between candles, indicating rapid repricing. Traders use it as a proxy for inefficiency: if price returns, it may partially or fully fill the gap before continuing. The midpoint of the gap is often treated as a particularly relevant reference, but whether price respects it depends on context.
💠 Inverted fair value gap
An inverted fair value gap is the idea that once an imbalance is “broken” in a meaningful way, the zone can flip its behavior. Instead of acting like a supportive zone, it may become resistive (or vice versa) on a later retest. Conceptually, this is similar to role reversal: what once behaved as a continuation aid can become a rejection zone after failure.
💠 Premium, discount, and equilibrium
Premium and discount describe where price sits relative to a defined recent range. Premium is the upper portion of that range and discount is the lower portion. Equilibrium is the midpoint. The concept is mainly used to align trade direction with location: buying is generally more attractive in discount and selling is generally more attractive in premium, assuming you are trading mean reversion within a range or seeking favorable risk placement within a broader trend.
💠 Swing failure pattern
A swing failure pattern is a reversal archetype where price breaks a known swing level, fails to hold beyond it, and returns back through the level. The logic is that the breakout attempt attracted orders and triggered stops, but the market rejected the extension. SFPs are often considered higher quality when the failure is followed by a decisive move away and when it aligns with a broader liquidity narrative.
💠 Higher timeframe context
Higher timeframe context means framing intraday or lower timeframe signals within the structure of a larger timeframe. This can include aligning trades with higher timeframe swings, using higher timeframe candles as reference for open/high/low behavior, and avoiding taking counter trend signals when the larger timeframe is strongly directional. The purpose is to improve signal quality by ensuring the smaller timeframe idea is not fighting a dominant larger flow.
💠 Trend channels
A trend channel is a structured way to visualize a market’s directional “lane” by framing price between two roughly parallel boundaries. The central idea is that trending price action often oscillates in a repeatable corridor: pullbacks tend to stall around one side of the lane, while impulses tend to extend toward the opposite side. Instead of treating trend as a single line, a channel treats trend as an area, which better reflects real market behavior where reactions occur in zones rather than at perfect prices.
A channel typically has three functional references: a guiding line that represents the prevailing slope, an upper boundary that approximates where bullish expansions tend to stretch before mean reversion, and a lower boundary that approximates where bearish pullbacks tend to terminate before continuation. The space between boundaries represents the market’s accepted path. When price stays inside this corridor, the trend is considered healthy. When price repeatedly fails to progress within it, the trend is weakening.
Channels are commonly used for timing and location. In an uptrend channel, pullbacks into the lower portion of the corridor are often treated as higher quality “location” for continuation attempts, while pushes into the upper portion are treated as extension territory where risk of a pause or retracement increases. In a downtrend channel, the logic is mirrored: rallies into the upper portion are often treated as sell side location, and moves into the lower portion are treated as extension territory. The channel does not predict direction by itself; it provides a disciplined map for where continuation is more likely versus where momentum is more likely to cool.
A key concept is acceptance versus deviation. If price briefly pierces a boundary and snaps back inside, that is often interpreted as a deviation, meaning the market tested outside the lane but did not accept it. If price holds outside the corridor and begins to build new swings there, that suggests acceptance and a potential regime change: either a new channel with a different slope, a shift into range, or a broader reversal context. This is why channels are most useful when you treat them as a framework for evaluating behavior, not as rigid support and resistance.
VV Moving Average Convergence Divergence # VMACDv3 - Volume-Weighted MACD with A/D Divergence Detection
## Overview
**VMACDv3** (Volume-Weighted Moving Average Convergence Divergence Version 3) is a momentum indicator that applies volume-weighting to traditional MACD calculations on price, while using the Accumulation/Distribution (A/D) line for divergence detection. This hybrid approach combines volume-weighted price momentum with volume distribution analysis for comprehensive market insight.
## Key Features
- **Volume-Weighted Price MACD**: Traditional MACD calculation on price but weighted by volume for earlier signals
- **A/D Divergence Detection**: Identifies when A/D trend diverges from MACD momentum
- **Volume Strength Filtering**: Distinguishes high-volume confirmations from low-volume noise
- **Color-Coded Histogram**: 4-color system showing momentum direction and volume strength
- **Real-Time Alerts**: Background colors and alert conditions for bullish/bearish divergences
## Difference from ACCDv3
| Aspect | VMACDv3 | ACCDv3 |
|--------|---------|---------|
| **MACD Input** | **Price (Close)** | **A/D Line** |
| **Volume Weighting** | Applied to price | Applied to A/D line |
| **Primary Signal** | Volume-weighted price momentum | Volume distribution momentum |
| **Use Case** | Price momentum with volume confirmation | Volume flow and accumulation/distribution |
| **Sensitivity** | More responsive to price changes | More responsive to volume patterns |
| **Best For** | Trend following, breakouts | Volume analysis, smart money tracking |
**Key Insight**: VMACDv3 shows *where price is going* with volume weight, while ACCDv3 shows *where volume is accumulating/distributing*.
## Components
### 1. Volume-Weighted MACD on Price
Unlike standard MACD that uses simple price EMAs, VMACDv3 weights each price by its corresponding volume:
```
Fast Line = EMA(Price × Volume, 12) / EMA(Volume, 12)
Slow Line = EMA(Price × Volume, 26) / EMA(Volume, 26)
MACD = Fast Line - Slow Line
```
**Benefits of Volume Weighting**:
- High-volume price movements have greater impact
- Filters out low-volume noise and false moves
- Provides earlier trend change signals
- Better reflects institutional activity
### 2. Accumulation/Distribution (A/D) Line
Used for divergence detection, measuring buying/selling pressure:
```
A/D = Σ ((2 × Close - Low - High) / (High - Low)) × Volume
```
- **Rising A/D**: Accumulation (buying pressure)
- **Falling A/D**: Distribution (selling pressure)
- **Doji Handling**: When High = Low, contribution is zero
### 3. Signal Lines
- **MACD Line** (Blue, #2962FF): The fast-slow difference showing momentum
- **Signal Line** (Orange, #FF6D00): EMA or SMA smoothing of MACD
- **Zero Line**: Reference for bullish (above) vs bearish (below) bias
### 4. Histogram Color System
The histogram uses 4 distinct colors based on **direction** and **volume strength**:
| Condition | Color | Meaning |
|-----------|-------|---------|
| Rising + High Volume | **Dark Green** (#1B5E20) | Strong bullish momentum with volume confirmation |
| Rising + Low Volume | **Light Teal** (#26A69A) | Bullish momentum but weak volume (less reliable) |
| Falling + High Volume | **Dark Red** (#B71C1C) | Strong bearish momentum with volume confirmation |
| Falling + Low Volume | **Light Pink** (#FFCDD2) | Bearish momentum but weak volume (less reliable) |
Additional shading:
- **Light Cyan** (#B2DFDB): Positive but not rising (momentum stalling)
- **Bright Red** (#FF5252): Negative and accelerating down
### 5. Divergence Detection
VMACDv3 compares A/D trend against volume-weighted price MACD:
#### Bullish Divergence (Green Background)
- **Condition**: A/D is trending up BUT MACD is negative and trending down
- **Interpretation**: Volume is accumulating while price momentum appears weak
- **Signal**: Smart money accumulation, potential bullish reversal
- **Action**: Look for long entries, especially at support levels
#### Bearish Divergence (Red Background)
- **Condition**: A/D is trending down BUT MACD is positive and trending up
- **Interpretation**: Volume is distributing while price momentum appears strong
- **Signal**: Smart money distribution, potential bearish reversal
- **Action**: Consider exits, avoid new longs, watch for breakdown
## Parameters
| Parameter | Default | Range | Description |
|-----------|---------|-------|-------------|
| **Source** | Close | OHLC/HLC3/etc | Price source for MACD calculation |
| **Fast Length** | 12 | 1-50 | Period for fast EMA (shorter = more sensitive) |
| **Slow Length** | 26 | 1-100 | Period for slow EMA (longer = smoother) |
| **Signal Smoothing** | 9 | 1-50 | Period for signal line (MACD smoothing) |
| **Signal Line MA Type** | EMA | SMA/EMA | Moving average type for signal calculation |
| **Volume MA Length** | 20 | 5-100 | Period for volume average (strength filter) |
## Usage Guide
### Reading the Indicator
1. **MACD Lines (Blue & Orange)**
- **Blue Line (MACD)**: Volume-weighted price momentum
- **Orange Line (Signal)**: Smoothed trend of MACD
- **Crossovers**: Blue crosses above orange = bullish, below = bearish
- **Distance**: Wider gap = stronger momentum
- **Zero Line Position**: Above = bullish bias, below = bearish bias
2. **Histogram Colors**
- **Dark Green (#1B5E20)**: Strong bullish move with high volume - **most reliable buy signal**
- **Light Teal (#26A69A)**: Bullish but low volume - wait for confirmation
- **Dark Red (#B71C1C)**: Strong bearish move with high volume - **most reliable sell signal**
- **Light Pink (#FFCDD2)**: Bearish but low volume - may be temporary dip
3. **Background Divergence Alerts**
- **Green Background**: A/D accumulating while price weak - potential bottom
- **Red Background**: A/D distributing while price strong - potential top
- Most powerful at key support/resistance levels
### Trading Strategies
#### Strategy 1: Volume-Confirmed Trend Following
1. Wait for MACD to cross above zero line
2. Look for **dark green** histogram bars (high volume confirmation)
3. Enter long on second consecutive dark green bar
4. Hold while histogram remains green
5. Exit when histogram turns light green or red appears
6. Set stop below recent swing low
**Example**:
```
Price: 26,400 → 26,450 (rising)
MACD: -50 → +20 (crosses zero)
Histogram: Light teal → Dark green → Dark green
Volume: 50k → 75k → 90k (increasing)
```
#### Strategy 2: Divergence Reversal Trading
1. Identify divergence background (green = bullish, red = bearish)
2. Confirm with price structure (support/resistance, chart patterns)
3. Wait for MACD to cross signal line in divergence direction
4. Enter on first **dark colored** histogram bar after divergence
5. Set stop beyond divergence area
6. Target previous swing high/low
**Example - Bullish Divergence**:
```
Price: Making lower lows (26,350 → 26,300 → 26,250)
A/D: Rising (accumulation)
MACD: Below zero but starting to curve up
Background: Green shading appears
Entry: MACD crosses signal line + dark green bar
Stop: Below 26,230
Target: 26,450 (previous high)
```
#### Strategy 3: Momentum Scalping
1. Trade only in direction of MACD zero line (above = long, below = short)
2. Enter on dark colored bars only
3. Exit on first light colored bar or opposite color
4. Quick in and out (1-5 minute holds)
5. Tight stops (0.2-0.5% depending on instrument)
#### Strategy 4: Histogram Pattern Trading
**V-Bottom Reversal (Bullish)**:
- Red histogram bars start rising (becoming less negative)
- Forms "V" shape at the bottom
- Transitions to light red → light teal → **dark green**
- Entry: First dark green bar
- Signal: Momentum reversal with volume
**Λ-Top Reversal (Bearish)**:
- Green histogram bars start falling (becoming less positive)
- Forms inverted "V" at the top
- Transitions to light green → light pink → **dark red**
- Entry: First dark red bar
- Signal: Momentum exhaustion with volume
### Multi-Timeframe Analysis
**Recommended Approach**:
1. **Higher Timeframe (15m/1h)**: Identify overall trend direction
2. **Trading Timeframe (5m)**: Time entries using VMACDv3 signals
3. **Lower Timeframe (1m)**: Fine-tune entry prices
**Example Setup**:
```
15-minute: MACD above zero (bullish bias)
5-minute: Dark green histogram appears after pullback
1-minute: Enter on break of recent high with volume
```
### Volume Strength Interpretation
The volume filter compares current volume to 20-period average:
- **Volume > Average**: Dark colors (green/red) - high confidence signals
- **Volume < Average**: Light colors (teal/pink) - lower confidence signals
**Trading Rules**:
- ✓ **Aggressive**: Take all dark colored signals
- ✓ **Conservative**: Only take dark colors that follow 2+ light colors of same type
- ✗ **Avoid**: Trading light colored signals during high volatility
- ✗ **Avoid**: Ignoring volume context during news events
## Technical Details
### Volume-Weighted Calculation
```pine
// Volume-weighted fast EMA
fast_ma = ta.ema(src * volume, fast_length) / ta.ema(volume, fast_length)
// Volume-weighted slow EMA
slow_ma = ta.ema(src * volume, slow_length) / ta.ema(volume, slow_length)
// MACD is the difference
macd = fast_ma - slow_ma
// Signal line smoothing
signal = ta.ema(macd, signal_length) // or ta.sma() if SMA selected
// Histogram
hist = macd - signal
```
### Divergence Detection Logic
```pine
// A/D trending up if above its 5-period SMA
ad_trend = ad > ta.sma(ad, 5)
// MACD trending up if above zero
macd_trend = macd > 0
// Divergence when trends oppose each other
divergence = ad_trend != macd_trend
// Specific conditions for alerts
bullish_divergence = ad_trend and not macd_trend and macd < 0
bearish_divergence = not ad_trend and macd_trend and macd > 0
```
### Histogram Coloring Logic
```pine
hist_color = (hist >= 0
? (hist < hist
? (vol_strength ? #1B5E20 : #26A69A) // Rising: dark/light green
: #B2DFDB) // Positive but falling: cyan
: (hist < hist
? (vol_strength ? #B71C1C : #FFCDD2) // Rising (less negative): dark/light red
: #FF5252)) // Falling more: bright red
```
## Alerts
Built-in alert conditions for divergence detection:
### Bullish Divergence Alert
- **Trigger**: A/D trending up, MACD negative and trending down
- **Message**: "Bullish Divergence: A/D trending up but MACD trending down"
- **Use Case**: Potential reversal or continuation after pullback
- **Action**: Look for long entry setups
### Bearish Divergence Alert
- **Trigger**: A/D trending down, MACD positive and trending up
- **Message**: "Bearish Divergence: A/D trending down but MACD trending up"
- **Use Case**: Potential top or trend reversal
- **Action**: Consider exits or short entries
### Setting Up Alerts
1. Click "Create Alert" in TradingView
2. Condition: Select "VMACDv3"
3. Choose alert type: "Bullish Divergence" or "Bearish Divergence"
4. Configure: Email, SMS, webhook, or popup
5. Set frequency: "Once Per Bar Close" recommended
## Comparison Tables
### VMACDv3 vs Standard MACD
| Feature | Standard MACD | VMACDv3 |
|---------|---------------|---------|
| **Price Weighting** | Equal weight all bars | Volume-weighted |
| **Sensitivity** | Fixed | Adaptive to volume |
| **False Signals** | More during low volume | Fewer (volume filter) |
| **Divergence** | Price vs MACD | A/D vs MACD |
| **Volume Analysis** | None | Built-in |
| **Color System** | 2 colors | 4+ colors |
| **Best For** | Simple trend following | Volume-confirmed trading |
### VMACDv3 vs ACCDv3
| Aspect | VMACDv3 | ACCDv3 |
|--------|---------|--------|
| **Focus** | Price momentum | Volume distribution |
| **Reactivity** | Faster to price moves | Faster to volume shifts |
| **Best Markets** | Trending, breakouts | Accumulation/distribution phases |
| **Signal Type** | Where price + volume going | Where smart money positioning |
| **Divergence Meaning** | Volume vs price disagreement | A/D vs momentum disagreement |
| **Use Together?** | ✓ Yes, complementary | ✓ Yes, different perspectives |
## Example Trading Scenarios
### Scenario 1: Strong Bullish Breakout
```
Time: 9:30 AM (market open)
Price: Breaks above 26,400 resistance
MACD: Crosses above zero line
Histogram: Dark green bars (#1B5E20)
Volume: 2x average (150k vs 75k avg)
A/D: Rising (no divergence)
Action: Enter long at 26,405
Stop: 26,380 (below breakout)
Target 1: 26,450 (risk:reward 1:2)
Target 2: 26,500 (risk:reward 1:4)
Result: High probability setup with volume confirmation
```
### Scenario 2: False Breakout (Avoided)
```
Time: 2:30 PM (slow period)
Price: Breaks above 26,400 resistance
MACD: Slightly positive
Histogram: Light teal bars (#26A69A)
Volume: 0.5x average (40k vs 75k avg)
A/D: Flat/declining
Action: Avoid trade
Reason: Low volume, no conviction, potential false breakout
Outcome: Price reverses back below 26,400 within 10 minutes
Saved: Avoided losing trade due to volume filter
```
### Scenario 3: Bullish Divergence Bottom
```
Time: 11:00 AM
Price: Making lower lows (26,350 → 26,300 → 26,280)
MACD: Below zero but curving upward
Histogram: Red bars getting shorter (V-bottom forming)
Background: Green shading (divergence alert)
A/D: Rising despite price falling
Volume: Increasing on down bars
Setup:
1. Divergence appears at 26,280 (green background)
2. Wait for MACD to cross signal line
3. First dark green bar appears at 26,290
4. Enter long: 26,295 (next bar open)
5. Stop: 26,265 (below divergence low)
6. Target: 26,350 (previous swing high)
Result: +55 points (30 point risk, 1.8:1 reward)
Key: Divergence + volume confirmation = high probability reversal
```
### Scenario 4: Bearish Divergence Top
```
Time: 1:45 PM
Price: Making higher highs (26,500 → 26,520 → 26,540)
MACD: Positive but flattening
Histogram: Green bars getting shorter (Λ-top forming)
Background: Red shading (bearish divergence)
A/D: Declining despite rising price
Volume: Decreasing on up bars
Setup:
1. Bearish divergence at 26,540 (red background)
2. MACD crosses below signal line
3. First dark red bar appears at 26,535
4. Enter short: 26,530
5. Stop: 26,555 (above divergence high)
6. Target: 26,475 (support level)
Result: +55 points (25 point risk, 2.2:1 reward)
Key: Distribution while price rising = smart money exiting
```
### Scenario 5: V-Bottom Reversal
```
Downtrend in progress
MACD: Deep below zero (-150)
Histogram: Series of dark red bars
Pattern Development:
Bar 1: Dark red, hist = -80, falling
Bar 2: Dark red, hist = -95, falling
Bar 3: Dark red, hist = -100, falling (extreme)
Bar 4: Light pink, hist = -98, rising!
Bar 5: Light pink, hist = -90, rising
Bar 6: Light teal, hist = -75, rising (crosses to positive momentum)
Bar 7: Dark green, hist = -55, rising + volume
Action: Enter long on Bar 7
Reason: V-bottom confirmed with volume
Stop: Below Bar 3 low
Target: Zero line on histogram (mean reversion)
```
## Best Practices
### Entry Rules
✓ **Wait for dark colors**: High-volume confirmation is key
✓ **Confirm divergences**: Use with price support/resistance
✓ **Trade with zero line**: Long above, short below for best odds
✓ **Multiple timeframes**: Align 1m, 5m, 15m signals
✓ **Watch for patterns**: V-bottoms and Λ-tops are reliable
### Exit Rules
✓ **Partial profits**: Take 50% at first target
✓ **Trail stops**: Use histogram color changes
✓ **Respect signals**: Exit on opposite dark color
✓ **Time stops**: Close positions before major news
✓ **End of day**: Square up before close
### Avoid
✗ **Don't chase light colors**: Low volume = low confidence
✗ **Don't ignore divergence**: Early warning system
✗ **Don't overtrade**: Wait for clear setups
✗ **Don't fight the trend**: Zero line dictates bias
✗ **Don't skip stops**: Always use risk management
## Risk Management
### Position Sizing
- **Dark green/red signals**: 1-2% account risk
- **Light signals**: 0.5% account risk or skip
- **Divergence plays**: 1% account risk (higher uncertainty)
- **Multiple confirmations**: Up to 2% account risk
### Stop Loss Placement
- **Trend trades**: Below/above recent swing (20-30 points typical)
- **Breakout trades**: Below/above breakout level (15-25 points)
- **Divergence trades**: Beyond divergence extreme (25-40 points)
- **Scalp trades**: Tight stops at 10-15 points
### Profit Targets
- **Minimum**: 1.5:1 reward to risk ratio
- **Scalps**: 15-25 points (quick in/out)
- **Swing**: 50-100 points (hold through pullbacks)
- **Runners**: Trail with histogram color changes
## Timeframe Recommendations
| Timeframe | Trading Style | Typical Hold | Advantages | Challenges |
|-----------|---------------|--------------|------------|------------|
| **1-minute** | Scalping | 1-5 minutes | Fast profits, many setups | Noisy, high false signals |
| **5-minute** | Intraday | 15-60 minutes | Balance of speed/clarity | Still requires quick decisions |
| **15-minute** | Swing | 1-4 hours | Clearer trends, less noise | Fewer opportunities |
| **1-hour** | Position | 4-24 hours | Strong signals, less monitoring | Wider stops required |
**Recommendation**: Start with 5-minute for best balance of signal quality and opportunity frequency.
## Combining with Other Indicators
### VMACDv3 + ACCDv3
- **Use**: Confirm volume flow with price momentum
- **Signal**: Both showing dark green = highest conviction long
- **Divergence**: VMACDv3 bullish + ACCDv3 bearish = examine price action
### VMACDv3 + RSI
- **Use**: Overbought/oversold with momentum confirmation
- **Signal**: RSI < 30 + dark green VMACD = strong reversal
- **Caution**: RSI > 70 + light green VMACD = potential false breakout
### VMACDv3 + Elder Impulse
- **Use**: Bar coloring + histogram confirmation
- **Signal**: Green Elder bars + dark green VMACD = aligned momentum
- **Exit**: Blue Elder bars + light colors = momentum stalling
## Limitations
- **Requires volume data**: Will not work on instruments without volume feed
- **Lagging indicator**: MACD inherently follows price (2-3 bar delay)
- **Consolidation noise**: Generates false signals in tight ranges
- **Gap handling**: Large gaps can distort volume-weighted values
- **Not standalone**: Should combine with price action and support/resistance
## Troubleshooting
**Problem**: Too many light colored signals
**Solution**: Increase Volume MA Length to 30-40 for stricter filtering
**Problem**: Missing entries due to waiting for dark colors
**Solution**: Lower Volume MA Length to 10-15 for more signals (accept lower quality)
**Problem**: Divergences not appearing
**Solution**: Verify volume data available; check if A/D line is calculating
**Problem**: Histogram colors not changing
**Solution**: Ensure real-time data feed; refresh indicator
## Version History
- **v3**: Removed traditional MACD, using volume-weighted MACD on price with A/D divergence
- **v2**: Added A/D divergence detection, volume strength filtering, enhanced histogram colors
- **v1**: Basic volume-weighted MACD on price
## Related Indicators
**Companion Tools**:
- **ACCDv3**: Volume-weighted MACD on A/D line (distribution focus)
- **RSIv2**: RSI with A/D divergence detection
- **DMI**: Directional Movement Index with A/D divergence
- **Elder Impulse**: Bar coloring system using volume-weighted MACD
**Use Together**: VMACDv3 (momentum) + ACCDv3 (distribution) + Elder Impulse (bar colors) = complete volume-based trading system
---
*This indicator is for educational purposes. Past performance does not guarantee future results. Always practice proper risk management and never risk more than you can afford to lose.*
Nexural QWAPQWAP - Quantitative Weighted Average Price with True Order Flow Analysis
INTRODUCTION
This is legit one of the best indicators I can possibly make. Since I don't have access to tick data on tradingview I can't claim it's as accurate as possible but it is a very polished indicator for VWAP based trading and the bands are VERY useful for mean reverting trading.
QWAP Elite is an advanced Volume Weighted Average Price indicator that incorporates true order flow analysis through intrabar data decomposition. Unlike traditional VWAP indicators that simply calculate price multiplied by volume divided by total volume, this indicator attempts to identify the directional intent behind that volume by analyzing whether buying or selling pressure dominated each bar at a granular level.
The fundamental premise of this indicator is that not all volume is created equal. A bar with 10000 contracts where 8000 were aggressive buyers tells a very different story than a bar with 10000 contracts where 8000 were aggressive sellers, even if both bars close at the same price. Traditional VWAP treats these identically. QWAP attempts to weight the VWAP calculation based on this directional flow information.
This indicator was designed for traders who believe that institutional order flow leaves detectable footprints in price and volume data, and that identifying these footprints can provide an edge in determining likely future price direction. It is not a holy grail and it is not a replacement for proper risk management and trading discipline.
HOW THE INDICATOR WORKS
The True CVD Engine
The core of this indicator is its Cumulative Volume Delta calculation. Most indicators on TradingView approximate buying and selling volume by looking at whether a bar closed higher or lower than it opened. If the bar closed green, they assign all volume as buying volume. If it closed red, they assign all volume as selling volume. This is a crude approximation that misses significant nuance.
QWAP Elite uses the request security lower tf function to pull actual intrabar data. This means if you are on a 5 minute chart, the indicator is looking at the individual ticks or smaller timeframe bars that occurred within that 5 minute period. It then calculates how much volume occurred on up moves versus down moves within that bar, giving a much more accurate picture of whether buyers or sellers were more aggressive.
The Delta Ratio is calculated as the net delta divided by total volume, resulting in a value between negative one and positive one. A value of positive 0.6 means that 80 percent of volume was buying and 20 percent was selling. A value of negative 0.4 means that 70 percent was selling and 30 percent was buying. This ratio is then used to weight the VWAP calculation.
The intrabar precision is displayed in the dashboard as the number of bars analyzed. More bars means more granular data and theoretically more accurate delta calculation. The indicator automatically selects an appropriate lower timeframe based on your chart timeframe to balance accuracy with computational performance.
VIX Integration and Volatility Intelligence
The indicator pulls live VIX data and uses it to adjust its calculations dynamically. The VIX or CBOE Volatility Index represents the market expectation of 30 day forward looking volatility derived from SP500 option prices. When VIX is elevated, markets behave differently than when VIX is compressed.
Specifically, the indicator uses VIX to adjust the standard deviation bands around VWAP. In high volatility environments where VIX is above 25 or 30, the bands automatically widen to account for larger price swings. In low volatility environments where VIX is below 15, the bands tighten. This prevents false signals that would occur if static band widths were used across all market conditions.
The indicator also pulls VVIX which is the volatility of the VIX itself and VIX9D which is the 9 day VIX. By comparing VIX to VIX9D, the indicator can identify term structure conditions. When short term VIX is higher than longer term VIX, this is called backwardation and often indicates fear or stress in the market. When short term VIX is lower, this is contango and indicates complacency.
The VIX regime classification in the dashboard shows CALM when VIX is below 12, NORMAL between 12 and 20, ELEVATED between 20 and 30, and FEAR when above 30. Each regime suggests different trading approaches and position sizing considerations.
DETECTION SYSTEMS
Absorption Detection
Absorption occurs when large volume enters the market but price barely moves. This happens when one side is absorbing all the aggression from the other side. For example, if aggressive sellers are hitting the bid repeatedly but price is not dropping, it suggests there is a large buyer absorbing all that selling pressure. This often precedes reversals.
The indicator detects absorption by looking for bars with above average volume, below average range, and high wick ratios. A high wick ratio means the bar has long wicks relative to its body, indicating price moved but was pushed back. When these conditions coincide with strong delta in one direction, it suggests institutional absorption.
Liquidity Sweep Detection
Liquidity sweeps, also known as stop hunts, occur when price briefly exceeds a recent high or low to trigger stop losses, then reverses. Large traders need liquidity to fill their orders, and stops clustered above swing highs or below swing lows represent pools of liquidity they can tap into.
The indicator identifies sweeps by detecting when price exceeds the 5 or 20 bar high or low but closes back inside. A bull trap is identified when price sweeps above recent highs but closes below them, suggesting sellers trapped buyers who bought the breakout. A bear trap is the opposite, where price sweeps lows but closes above, trapping shorts.
Sweep detection is most useful when combined with delta analysis. A sweep with strong opposing delta, meaning price swept highs but delta was heavily negative, is a higher probability reversal signal than a sweep alone.
CVD Divergence Detection
Divergence between price and cumulative delta is one of the most reliable signals the indicator produces. When price is making higher highs but cumulative delta is making lower highs, it suggests that buying pressure is weakening even though price is still rising. This bearish divergence often precedes pullbacks or reversals.
Conversely, bullish divergence occurs when price makes lower lows but cumulative delta makes higher lows. This suggests that even though price is dropping, buying pressure is actually increasing, and sellers may be exhausted. These divergences are calculated over a 5 bar lookback period.
Stacked Imbalance Detection
Stacked imbalances occur when there are three or more consecutive bars with strong delta in the same direction. This represents sustained aggressive positioning by one side of the market. Three consecutive bars with delta above 0.5 suggests aggressive institutional buying. Three consecutive bars below negative 0.5 suggests aggressive institutional selling.
The count of consecutive imbalanced bars is displayed in the detection section. Four or more stacked imbalances is considered highly significant. This pattern often precedes continuation moves in the direction of the imbalance, as it suggests a committed directional player has entered the market.
Institutional Flow Detection
The indicator attempts to identify institutional activity by looking for the convergence of multiple factors. Specifically, it requires strong delta above 0.5 or below negative 0.5, volume persistence across multiple bars meaning above average volume for at least 2 to 3 bars in a row, and delta persistence meaning delta in the same direction for multiple consecutive bars.
When these factors align, the dashboard displays INST BUY or INST SELL instead of RETAIL. This classification should be viewed as a probability estimate rather than a certainty. Retail traders can produce similar patterns, and institutions can hide their activity. The designation is meant to highlight periods where the characteristics of flow are consistent with larger players.
ADAPTIVE WEIGHT SYSTEM
The indicator includes an adaptive system that automatically adjusts how much weight the CVD analysis has on the VWAP calculation. In quiet, low volatility markets, the CVD weight is reduced because the signal to noise ratio is lower. In active, high volatility markets with clear directional flow, the weight is increased.
The adaptation considers multiple factors including VIX regime, delta clarity meaning how strong and consistent the delta readings are, volume persistence, and time of day session weighting. The current adaptive weight is displayed in the dashboard and typically ranges from 0.05 to 0.50.
The adaptation speed setting controls how quickly the weight responds to changing conditions. A higher speed means faster adaptation but potentially more noise. A lower speed means smoother adaptation but potentially slower response to regime changes.
SESSION AWARENESS
Not all trading hours are equal. The indicator applies different weights to different trading sessions based on typical liquidity and reliability patterns. The open drive, which covers 9 30 to 10 30 AM Eastern time, receives a 1.4x weight multiplier because this is typically the highest volume and most directionally significant period of the day.
Power hour from 3 00 to 4 00 PM Eastern receives a 1.3x multiplier as institutional traders often execute their daily positioning in this final hour. The lunch hour from 11 00 AM to 2 00 PM receives a 0.9x multiplier due to typically lower volume and more choppy price action. Premarket receives 0.7x and after hours receives 0.5x due to thin liquidity and unreliable signals.
The current session is displayed in the dashboard header. Traders should consider reducing position sizes and widening stops during lower weight sessions, particularly premarket and after hours where the indicator readings are less reliable.
COMPOSITE SCORES
Bias Score
The Bias Score ranges from negative 100 to positive 100 and represents the indicators overall directional lean. It synthesizes delta analysis, VWAP momentum, and multi-timeframe confluence into a single number. A score above 50 indicates strong bullish bias. A score below negative 50 indicates strong bearish bias. Scores between negative 20 and positive 20 are considered neutral.
The visual bias meter in the dashboard shows this score as a bar that leans left for bearish or right for bullish. This provides an at a glance summary of the indicators current directional reading without needing to interpret multiple individual metrics.
Setup Quality Score
The Setup Quality Score ranges from 0 to 100 and measures how many factors are aligning to support a potential trade. It awards points for strong delta readings, volume persistence, multi-timeframe confluence, detection events like absorption or divergence, and favorable session timing. A score above 60 suggests multiple factors are confirming. A score below 30 suggests the setup lacks confirmation.
This score is designed to help traders filter trades. Rather than acting on every signal, traders can set a minimum quality threshold. For example, only taking trades when quality is above 50 will filter out lower probability setups. Higher thresholds mean fewer trades but potentially higher win rates.
Heat Score
The Heat Score measures overall market activity intensity and ranges from 0 to 100. It combines volume heat meaning how elevated current volume is relative to average, volatility heat based on ATR expansion or VIX levels, delta heat meaning how strong the current delta reading is, and deviation heat meaning how far price is from VWAP.
Markets with heat above 75 are classified as EXTREME and typically represent high opportunity but also high risk environments. Heat between 50 and 75 is ACTIVE and represents good trading conditions. Heat between 25 and 50 is NORMAL. Heat below 25 is QUIET and suggests range bound conditions where mean reversion strategies may outperform trend following.
DASHBOARD GUIDE
Header Row
The header row displays QWAP with a lightning bolt icon, the current session abbreviation like OPEN or POWER or LUNCH, the current regime classification, and VIX status with a colored indicator. Green indicates low VIX and favorable conditions. Yellow indicates elevated VIX. Red indicates high VIX or that VIX data is unavailable.
Signal Row
The signal row is the largest and most prominent element. It displays the primary signal which will be LONG, SHORT, REVERSAL, or WAIT. LONG appears when bias is strongly bullish and quality is high. SHORT appears when bias is strongly bearish and quality is high. REVERSAL appears when divergence or absorption is detected at an extreme sigma level. WAIT appears when conditions do not meet the threshold for a signal.
Next to the signal is the quality score displayed as Q followed by a number out of 100. This helps traders quickly assess how confirmed the signal is. A LONG signal with Q 72 is more compelling than a LONG signal with Q 45.
Order Flow Section
The delta row shows the current delta direction as BUY or SELL, the percentage strength, a visual indicator of strength with filled or empty circles, and an arrow indicating whether delta is accelerating or decelerating. The flow row shows whether activity is classified as INST BUY, INST SELL, or RETAIL, along with the number of intrabar data points used in the calculation.
Market Section
The heat row displays the heat score as a visual bar and numeric value. The vol row shows volatility state as EXPAND, COMPRESS, or NORMAL along with relative volume. The dist row shows distance from VWAP in sigmas and percentage, plus momentum direction.
Detection Section
This section only appears when detections are active. It displays warning icons next to detection types like BUY ABS, SELL ABS, BULL TRAP, BEAR TRAP, BULL DIV, BEAR DIV, BUY STACK, or SELL STACK. Each detection includes a score representing its strength or significance.
HOW TO USE THIS INDICATOR
Recommended Workflow
First, check the regime and session. If VIX is in FEAR mode or you are in premarket or after hours, consider reduced position sizing or waiting for better conditions.
Second, look at the primary signal and quality score. Signals with quality below 40 are low conviction. Consider requiring quality above 50 or 60 before acting.
Third, check the bias meter for overall directional lean. Ensure it aligns with your intended trade direction.
Fourth, review active detections. Absorption and divergence near VWAP bands increase reversal probability. Stacked imbalances support continuation.
Fifth, use VWAP and sigma bands for entry, stop, and target placement. The bands provide natural support and resistance levels based on statistical distribution.
Sixth, monitor for changes in delta and flow classification. Institutional activity transitioning to retail or delta reversing direction are warning signs.
TRADE EXAMPLES
Mean Reversion Setup
Price extended to 2.5 sigma above VWAP. Signal shows REVERSAL. Quality is 55. Absorption detected with BUY ABS showing score of 2.3. Delta is showing SELL at 45 percent despite price being elevated. This suggests buyers are being absorbed and a pullback to VWAP is likely. Enter short with stop above the 3 sigma band and target at VWAP or 1 sigma band.
Trend Continuation Setup
Signal shows LONG with quality 68. Bias meter shows STRONG BULL. BUY STACK detected with 4 consecutive imbalanced bars. Flow shows INST BUY. Price has pulled back to VWAP and is finding support. Heat is at 62 indicating ACTIVE conditions. Enter long on VWAP touch with stop below 1 sigma band and target at 2 sigma band.
Liquidity Sweep Setup
BEAR TRAP detected with score of 1.8. Price swept below recent lows but closed back above. Delta is showing BUY at 52 percent on the sweep bar. BULL DIV also active as price made lower low but delta made higher low. Signal shows REVERSAL with quality 58. Enter long with stop below the sweep low and target at VWAP.
HONEST ASSESSMENT OF STRENGTHS AND WEAKNESSES
Strengths
True CVD calculation using intrabar data is significantly more accurate than close greater than open approximations used by most indicators. This provides genuine insight into buying versus selling pressure.
VIX integration with term structure analysis is institutional grade thinking applied to a retail tool. Dynamic band adjustment prevents false signals in different volatility regimes.
Multiple detection systems provide different perspectives on the same market. Absorption, sweeps, divergence, and imbalances each capture different footprints of institutional activity.
Composite scores synthesize complex information into actionable numbers. Traders do not need to mentally integrate 15 different metrics. The quality score and bias score do this automatically.
Session awareness prevents trading during low quality periods. The automatic weighting helps filter out noise from premarket, after hours, and lunch periods.
Adaptive system self adjusts to market conditions. Traders do not need to manually tune parameters as volatility and activity change.
Weaknesses and Limitations
Intrabar data is still an approximation of true tick level order flow. Without actual tick data showing individual trades hitting bid versus lifting offer, even this calculation has error bars. Professional platforms like Sierra Chart or Quantower with direct exchange feeds will always have more accurate delta.
The indicator is computationally heavy. Users may experience slower chart loading particularly on lower end hardware or when viewing many bars. The optimization features help but cannot eliminate this cost entirely.
Institutional detection is probabilistic not definitive. Retail traders in aggregate can produce patterns that look institutional. Institutions can and do hide their activity. The INST BUY and INST SELL labels should be viewed as probability shifts not certainties.
The indicator works best on liquid instruments with significant volume. On thinly traded stocks or during illiquid periods, delta calculations become noisy and unreliable. The indicator is optimized for ES, NQ, SPY, QQQ, and similar high volume instruments.
VIX integration only works for US equity index products. If trading forex, crypto, or other asset classes, the VIX data is not directly applicable and should be disabled.
No indicator can predict the future. Order flow analysis shows what happened and what is happening. It cannot guarantee what will happen next. Large players can and do reverse their positioning. News events can invalidate any technical setup instantly.
The complexity of the indicator means there is a learning curve. New users may be overwhelmed by the number of metrics displayed. It takes time to develop intuition for what combinations of readings are significant.
The indicator does not include automated backtesting or historical performance statistics. Users cannot easily quantify the win rate or expected value of following its signals without manual journaling and analysis.
RISK MANAGEMENT GUIDELINES
This indicator is a tool not a trading system. It provides information that may help inform trading decisions but it does not make those decisions for you. Proper risk management is essential regardless of how compelling the indicator readings appear.
Position Sizing
Never risk more than 1 to 2 percent of your account on any single trade regardless of how high the quality score is. High quality setups still fail regularly. A setup with 70 percent win rate still loses 30 percent of the time, and those losses can come in clusters.
Consider reducing position size when VIX is in ELEVATED or FEAR regime, when trading during premarket or after hours sessions, when quality score is below 50, and when multiple detection systems are conflicting with each other.
Stop Loss Placement
The sigma bands provide natural levels for stop placement. For mean reversion trades, stops should typically be placed beyond the next sigma level. For example, if entering short at 2 sigma, place stop beyond 3 sigma. For trend trades entering at VWAP, consider stops beyond 1 sigma in the opposite direction.
Stops should also respect market structure. If there is a recent swing high or low near your calculated stop level, extend the stop beyond that swing point. Placing stops at obvious levels invites stop hunting.
In high VIX environments, consider wider stops. The VIX band multiplier automatically widens the sigma bands, and your stops should reflect this increased volatility. A stop that works in a 15 VIX environment may be too tight when VIX is 30.
Taking Profits
The sigma bands also provide natural profit targets. For mean reversion trades, VWAP itself is often the first target with the opposite 1 sigma band as an extended target. For trend trades, each sigma band can serve as a scaling point.
Pay attention to delta and flow changes as price approaches targets. If delta is weakening or flow classification shifts from institutional to retail, consider taking profits early. Conversely, if delta is strengthening into the target, consider holding for extension.
When to Avoid Trading
Consider sitting out when the signal shows WAIT and quality is below 30. In these conditions, the indicator is essentially saying there is no clear edge. Trading anyway is gambling not trading.
Avoid trading during major news events. The indicator cannot account for sudden information shocks. Economic releases, Fed announcements, earnings reports, and geopolitical events can invalidate any technical setup instantly.
Consider avoiding the first and last 5 minutes of regular trading hours. These periods often have erratic price action and unreliable delta calculations due to order imbalances at open and close.
SETTINGS REFERENCE
Core Engine Settings
VWAP Source determines what price is used for the VWAP calculation. The default HLC3 uses the average of high, low, and close which provides a balanced representation. HL2 uses just high and low average. Close uses only the closing price. Most traders should leave this at HLC3.
True CVD Engine should remain enabled for accurate order flow analysis. Disabling it falls back to close greater than open estimation which is significantly less accurate. Only disable if you are experiencing performance issues.
CVD Impact controls how much the delta analysis affects the VWAP calculation. Higher values mean delta has more influence. The default 0.2 provides a balance. Increase toward 0.5 if you want delta to have stronger effect. Decrease toward 0.1 if you want something closer to traditional VWAP.
Detection Sensitivity offers three presets. Conservative produces fewer signals but higher confidence. Balanced is the default middle ground. Aggressive produces more signals but with more false positives. New users should start with Balanced and adjust based on experience.
VIX Settings
VIX Integration should be enabled when trading US equity index products like ES, NQ, SPY, or QQQ. Disable it when trading forex, crypto, commodities, or individual stocks where VIX is not directly applicable.
VIX Symbol allows selection between VIX for SP500 volatility, VXN for Nasdaq volatility, and RVX for Russell 2000 volatility. Choose the one most relevant to your trading instrument.
VIX Baseline sets the historical average VIX level used for normalization. The default 16 represents the long term average. If trading in a persistently higher or lower VIX environment, adjusting this can help calibrate the regime classifications.
Display Settings
Dashboard Style offers three options. Compact shows only the signal and bias meter for minimal screen footprint. Elite adds order flow and market sections for balanced information. Full adds VIX details, detections, and adaptive system information for complete visibility.
FREQUENTLY ASKED QUESTIONS
Why does the indicator sometimes show WAIT when there is an obvious trend
The signal system is designed to identify high probability entry points not to constantly indicate trend direction. A strong uptrend may show WAIT because price is extended from VWAP and a pullback is likely before continuation. The indicator is trying to prevent you from buying the top of an impulse move.
Why is my delta reading different from another order flow tool
Different platforms calculate delta differently. Some use tick data. Some use time based aggregation. Some use volume based aggregation. The timeframe being analyzed matters as well. QWAP uses intrabar data which is more accurate than close versus open approximations but less accurate than true tick data from professional platforms.
Can I use this indicator for scalping
The indicator can be used on lower timeframes but becomes less reliable. On 1 minute charts, the intrabar decomposition has fewer data points to work with. For scalping, consider using 3 to 5 minute charts as a minimum. Also note that the session weighting and detection systems are calibrated for swing and intraday trading, not ultra short term scalping.
Does this indicator repaint
The VWAP line and sigma bands can adjust slightly as intrabar data comes in during a live bar. Once a bar closes, those values are fixed. The signals and detections are calculated on closed bars and do not repaint. For live trading, wait for bar close confirmation before acting on signals.
What markets does this work best on
The indicator is optimized for high liquidity US equity index products including ES, NQ, SPY, QQQ, IWM, and DIA. It can work on other liquid instruments but the VIX integration should be disabled for non equity products. Avoid using on low volume stocks or illiquid markets where delta calculations will be noisy.
DISCLAIMER
This indicator is provided for educational and informational purposes only. It is not financial advice. Past performance of any trading methodology is not indicative of future results. Trading futures, options, and other derivatives involves substantial risk of loss and is not suitable for all investors.
The creator of this indicator makes no guarantees about its accuracy or profitability. All trading decisions are the sole responsibility of the user. Before trading with real money, thoroughly test any strategy in simulation and ensure you understand the risks involved.
Order flow analysis provides information about market microstructure but cannot predict future price movements with certainty. Markets are complex adaptive systems influenced by countless variables including news events, economic data, central bank policy, geopolitical developments, and collective human psychology. No indicator can fully capture this complexity.
Use this tool as one input among many in your trading process. Combine it with sound risk management, proper position sizing, and continuous education. The best traders are those who remain humble about what they do not know and disciplined about protecting their capital.
ICT Smart Money Trading Suite PRO [SwissAlgo]ICT SMC Trading Suite Pro
Structure Detection. Imbalance Tracking. Trade Planning. Contextual Alerts.
Why This Integrated System Was Built
The ICT/SMC methodology requires tracking multiple analytical components simultaneously - a process prone to manual errors, time inefficiency, and visual clutter . This indicator consolidates these elements into a single, unified system , providing rules-based validation for experienced ICT traders who may struggle with execution speed, consistency, and manual calculations.
-----------------------------------------------------------------
What This Indicator Does
ICT/SMC methodology involves tracking multiple analytical components simultaneously. This indicator consolidates them into a single system.
Common challenges when applying ICT manually:
1️⃣ Structure Identification
Determining which pivots qualify as external (macro) structure versus internal (micro) structure requires consistent rules. Inconsistent structure identification affects the detection of the relevant trading range for entries , Change of Character (ChoCH) , and Break of Structure (BoS) . Accurate structure identification is paramount ; a faulty reading invalidates the entire ICT thesis for the current swing. While no automated system can replace human judgment, the indicator provides you with a rules-based starting point for structural analysis. The key goal is to help you find and map the relevant structural leg to focus on.
2️⃣ Chart Organization
Drawing Fibonacci retracements, Fair Value Gaps, Order Blocks, and other imbalances manually creates visual complexity that can obscure the analysis. The indicator addresses this by striving to show all imbalances in a consistent, unified, and understandable visual way , using color coding and z-order layering to maintain clarity even when multiple components are active.
3️⃣ Imbalance Tracking
ICT methodology requires monitoring a vast array of institutional footprints : Fair Value Gaps (FVG), Order Blocks (OB), Breaker Blocks (BB), Liquidity Pools (LP), Volume Imbalances, Wick Imbalances, and Kill Zone ranges. Tracking all these simultaneously and manually monitoring their mitigation status is highly time-intensive and prone to oversight . The indicator constantly scans and tracks all key imbalance types for you, automatically updating their status and creating a dynamic, real-time visual heatmap of unmitigated institutional inefficiency.
4️⃣ Trade Calculation
Determining structure-based Stop Loss (SL) placement, calculating multiple Take Profit (TP) levels with accurate position-sizing splits, and computing the final blended Risk-to-Reward (R:R) ratio involves multiple time-sensitive, manual calculations per setup . The indicator automates this entire trade calculation process for you, instantly providing the necessary pricing (entry, SL, TP), sizing, and performance projections, and mitigating the risk of execution error .
5️⃣ Condition Monitoring
ICT setups often require specific technical conditions to align: price reaching discount Fibonacci levels (0.618-0.882 for shorts, 0.118-0.382 for longs), EMA crossovers confirming momentum, or structural shifts (ChoCH/BoS). Identifying these moments requires continuous chart observation across multiple assets and timeframes.
This indicator includes an alert system that monitors these technical conditions and sends notifications when they occur (real-time). The alert system is designed to minimize spam. This allows traders to review potential setups on demand rather than through continuous observation - particularly relevant for those monitoring multiple instruments or trading sessions outside their local timezone.
-----------------------------------------------------------------
Intended Use
This indicator is designed for traders who:
♦ Apply ICT/SMC methodology - Familiarity with concepts such as Fair Value Gaps, Order Blocks, Liquidity Pools, market structure, and discount/premium zones is assumed. The indicator does not teach these concepts but provides tools to apply them.
♦ Trade on intraday to swing timeframes - The structure detection and Fibonacci zone mapping work across multiple timeframes. Recommended primary timeframe: 1H (adjustable based on trading approach).
♦ Prefer systematic entry planning - The trade calculation feature computes stop loss, take profit levels, and risk-to-reward ratios based on structure and Fibonacci positioning. Suitable for traders who use defined entry criteria.
♦ Monitor multiple instruments or sessions - The alert functionality notifies when specific technical conditions occur (discount zone entries, EMA crossovers, structure changes), reducing the need for continuous manual monitoring.
♦ Use trade execution platforms - The trade summary table displays pre-formatted values (entry, SL, TP levels with quantity splits) that can be manually input into trading platforms or bot services like 3Commas.
-----------------------------------------------------------------
How To Use
Step 1: Structure Analysis
The indicator automatically detects external and internal market structure using pivot analysis. Structure lines are color-coded: red for bearish structure, green for bullish. External pivots are marked with larger triangles, internal pivots with smaller markers. The pivot length parameters (default: 20/20) can be adjusted in settings to align with your structural analysis approach and the asset you are analyzing.
Step 2: Define Your Trading Zone
Use the "Start Swing" and "End Swing" date inputs to mark the beginning and end of the (external) structural leg you wish to analyze. The indicator calculates Fibonacci retracement levels based on these points and color-codes the zones:
* Green zones: Discount area (0.618-0.882 for bearish / 0.118-0.382 for bullish)
* Yellow zones: Premium area (0.786-1.0 for bearish / 0.0-0.214 for bullish)
* Red zones: Extension area beyond structure (potential fake-out zones)
Step 3: Review Imbalances
The indicator identifies and displays multiple imbalance types:
🔥 Volume imbalances (from displacement candles based on PVSRA methodology)
🔥 Fair Value Gaps (FVG)
🔥 Order Blocks (OB) and Breaker Blocks (BB)
🔥 Liquidity Pools (LP) at equal highs/lows
🔥 Wick imbalances (exceptional wick formations)
🔥 Kill Zone liquidity from specific trading sessions (Asian, London, NY AM)
Volume Imbalances
Fair Value Gaps
Order Blocks
Liquidity Pools
Wick Imbalances
Kill Zone Imbalances
According to ICT methodology, imbalances act as price magnets - areas where price tends to return for mitigation. When multiple imbalances overlap at the same price level, this creates a confluence zone with a higher probability of price reaction .
Imbalances are displayed as gray boxes , creating a visual heatmap of institutional inefficiencies. When imbalances overlap, the zones appear darker due to layering, and labels combine to show confluence (e.g., "FVG + OB" or "Vol + LP").
Heatmap of Imbalances
User can view each type alone, or all together (heatmap)
Each imbalance type is tracked until mitigated by price according to ICT principles and can be toggled on/off independently in settings.
Step 4: Reference Levels & Sessions
The indicator displays additional reference data:
🔥 Daily Pivot Points (PP, R1-R3, S1-S3) calculated from previous day
🔥Average Daily Range (ADR) projected from the current day's extremes
🔥 Daily OHLC levels: Today's Open (DO), Previous Day High (PDH), Previous Day Low (PDL)
🔥Session backgrounds (optional): Color-coded boxes for Asian, London, NY AM, and NY PM sessions
Sessions
While these are not ICT-specific imbalances, they represent widely-watched price levels that often attract institutional activity and can act as additional reference points for support, resistance, and liquidity targeting.
All reference levels can be toggled independently in settings.
Step 5: Momentum Reference
EMA 14 and EMA 21 lines are displayed for momentum analysis. When EMA 14 enters discount zones and crosses EMA 21, a triangle marker appears on the chart. This indicates a potential alignment of structure and momentum conditions.
Step 6: Trade Planning
Input your intended entry price in the "Entry Price" field along with your margin and leverage parameters. The indicator automatically calculates all trade parameters:
* Stop loss level (based on Fibonacci structure - typically at 1.118 extension)
* Three take profit levels (TP1, TP2, TP3) with position quantity splits
* Risk-to-reward ratio (blended across all three targets)
* Projected profit/loss values in both dollars and percentage
All calculated values are displayed both visually on the chart (as horizontal lines with labels) and in a formatted Trade Summary table. The table organizes the information for quick reference: entry details, take profit levels with quantities, stop loss parameters, and performance projections.
This pre-calculated data can be manually copied into trading platforms or bot services (such as 3Commas Smart Trades) without requiring additional calculations.
Step 7: Alert Configuration
Create alerts using TradingView's alert system (select "Any alert() function call"). The indicator sends notifications when:
* Price reaches specific discount Fibonacci levels (0.618, 0.786, 0.882 for shorts / 0.382, 0.214, 0.118 for longs)
* EMA 14/21 crossovers occur within discount zones
* Change of Character (ChoCH) is detected
* Break of Structure (BoS) is detected
Note: Alerts require active TradingView alert functionality. Update alerts when changing your trading zone parameters.
-----------------------------------------------------------------
Key Features
Structure & Zone Analysis
* Automated structure detection with external/internal pivots and zig-zag visualization
* Fibonacci retracement mapping with color-coded discount/premium zones
* Visual zone classification: Green (optimal discount), Yellow (premium), Red (fake-out risk)
ICT Imbalances Heatmap
* Volume imbalances (PVSRA displacement candles)
* Fair Value Gaps (FVG)
* Order Blocks (OB) and Breaker Blocks (BB)
* Liquidity Pools (LP) at equal highs/lows
* Wick imbalances (exceptional wick formations)
* Kill Zone liquidity (Asian, London, NY AM sessions)
* Confluence detection with combined labels and visual layering
Reference Levels
* Daily Pivot Points (PP, R1-R3, S1-S3)
* Average Daily Range (ADR) projections
* Daily OHLC levels (DO, PDH, PDL)
* Session backgrounds for kill zones
Trade Planning Tools
* Automated stop loss calculation based on Fibonacci structure
* Three-tier take profit system with position quantity splits
* Risk-to-reward ratio calculation (blended across all targets)
* P&L projections in dollars and percentages
* Trade Summary table formatted for manual platform entry
Momentum & Signals
* EMA 14/21 overlay for momentum analysis
* Visual crossover markers (triangles) in discount zones
* Change of Character (ChoCH) detection and labels
* Break of Structure (BoS) detection and labels
Chart Enhancements
* Higher timeframe candle overlay (5m to Monthly)
* PVSRA candle coloring (volume-based)
* Symbol legend for quick reference
* Customizable visual elements (toggle all components independently)
Alert System
* Discount zone entry notifications (Fibonacci level monitoring)
* EMA crossover signals within discount zones
* Structure change alerts (ChoCH and BoS)
* Configurable via TradingView alert functionality
Alert Functionality
The indicator includes an alert system that monitors technical conditions continuously.
When configured, alerts notify users when specific events occur:
❗ Discount Zone Monitoring
When EMA 14 crosses into key Fibonacci levels (0.618, 0.786, 0.882 for bearish structure / 0.382, 0.214, 0.118 for bullish structure), an alert is triggered. Example: Trading BTC and ETH simultaneously - instead of monitoring both charts for zone entries, alerts notify when either asset reaches the specified level.
❗ Momentum Alignment
When EMA 14 crosses EMA 21 within discount zones, an alert is sent. Example: Monitoring setups across multiple timeframes (1H, 4H, Daily) - alerts indicate when momentum conditions align on any timeframe being tracked.
❗ Structure Changes
Change of Character (ChoCH) and Break of Structure (BoS) events trigger alerts. Example: Trading during the Asian session while located in a different timezone - alerts notify of structure changes occurring outside active monitoring hours.
Configuration
Alerts are set up through TradingView's native alert system. Select "Any alert() function call" when creating the alert.
⚠️ Note: Alert parameters are captured at creation time, so alerts must be updated when changing trading zone settings (Start/End Swing dates) or any other parameter.
How to Create Alerts
Step 1: Open Alert Creation
Click the "Alert" button (clock icon) in the top toolbar of TradingView, or right-click on the chart and select "Add Alert."
Step 2: Configure Alert Condition
* In the alert dialog, set the Condition dropdown to select this indicator
* Set the alert type to ⚠️ " Any alert() function call "
* This configuration allows the indicator to trigger alerts based on its internal logic
Step 3: Set Alert Timing
* Timeframe: Same as chart
* Expiration: Choose "Open-ended (when triggered)" to keep the alert active until conditions occur
* Message tab: choose a name for the alert
Step 4: Notification Settings
Configure how you want to receive notifications:
* Popup within TradingView
* Email notification
* Mobile app push notification (requires TradingView mobile app)
Step 5: Create
Important Notes:
* Alert parameters are captured at creation time . If you change your trading zone (Start/End Swing dates) or entry price, delete the old alert and create a new one .
* One alert per chart: Create separate alerts for each instrument and timeframe you're monitoring.
* TradingView alert limits apply based on your TradingView subscription tier.
What Triggers Alerts: This indicator sends alerts for four key event types:
1. Discount Zone Entry - EMA 14 crossing key Fibonacci levels
2. Momentum Crossover - EMA 14/21 crossovers within discount zones
3. Change of Character (ChoCH) - Structure reversal detected
4. Break of Structure (BoS) - Trend continuation confirmed
All four conditions are monitored by a single alert configuration .
-----------------------------------------------------------------
Recommended Settings
* Timeframe : 1H works well for most assets
* Theme : Dark mode recommended
* Structural Pivots : Default 20/20 captures reasonable structure; adjust to match your analysis
-----------------------------------------------------------------
Chart Elements Guide
♦ Structure Visualization
Zig-zag lines
Automated structure detection - green lines indicate bullish structure, red lines indicate bearish structure. Thick lines represent external structure , thin faded lines show internal structure .
Triangle markers
Large triangles mark external pivots (swing highs/lows), small triangles mark internal pivots.
Fibonacci Zones
* Green zones: Discount area - potential entry zones (0.618-0.882 for shorts / 0.118-0.382 for longs)
* Yellow zones: Premium area - higher extension zones (0.786-1.0 for shorts / 0.0-0.214 for longs)
* Red zones: Fake-out risk area - price beyond structural extremes (above 1.0 for shorts / below 0.0 for longs)
* White dashed lines: Individual Fibonacci levels (1.0, 0.882, 0.786, 0.618, 0.5, 0.382, 0.214, 0.118, 0.0)
♦ Imbalance Heatmap
Gray boxes with dotted midlines
Unmitigated imbalances create a visual heatmap. Overlapping imbalances appear darker due to layering.
Combined labels
When multiple imbalances overlap, labels show confluence (e.g., "FVG + OB", "Vol + LP + Wick")
Types displayed : Vol (Volume), FVG (Fair Value Gap), OB (Order Block), BB (Breaker Block), LP (Liquidity Pool), Wick, KZ (Kill Zone)
♦ Momentum Indicators
* Red line: EMA 14
* Yellow line: EMA 21
* Small triangles on price: Crossover signals - red triangle (bearish crossover), green triangle (bullish crossover) when occurring within discount zones
♦ Structure Change Markers
* Labels with checkmarks/crosses: ChoCH (Change of Character) and BoS (Break of Structure) events (Green label with ✓: Bullish ChoCH or BoS, Red label with ✗: Bearish ChoCH or BoS)
♦ Trade Planning Lines (when entry price is set)
* Blue horizontal line: Entry price
* Green dashed lines: TP1 and TP2
* Green solid line: TP3 (final target)
* Red horizontal line: Stop Loss level
TP levels and SL are calculated based on the structure range, entry price, and mapped trading zone, and aim to achieve a minimum risk: reward ratio of 1:1.5 (R:R)
♦ Colored background zones:
Green shading between entry and TP3 (profit zone), red shading between entry and SL (loss zone)
♦ Reference Levels
* Orange dotted lines with labels: Daily Pivot Points (PP, R1-R3, S1-S3)
* Purple dotted lines with labels: ADR High and ADR Low projections
* Cyan dotted lines with labels: DO (Daily Open), PDH (Previous Day High), PDL (Previous Day Low)
♦ Session Backgrounds (optional)
* Yellow shaded box: Asian session (19:00-00:00 NY time)
* Blue shaded box: London session (02:00-05:00 NY time)
* Green shaded box: NY AM session (09:30-11:00 NY time)
* Orange shaded box: NY PM session (13:30-16:00 NY time)
♦ Trade Summary Table (top-right corner)
Displays a complete trade plan with sections:
* Sanity Check: Plan validation status
* Setup: Trade type, leverage, entry price, position size
* Take Profit: TP1, TP2, TP3 with prices, percentages, and quantity splits
* Stop Loss: SL price and type
* Performance: Potential profit/loss, ROI, and risk-to-reward ratio
♦ HTF Candle Overlay (optional, displayed to the right of the current price)
* Larger candlesticks representing higher timeframe price action
* Green bodies: Bullish HTF candles
* Red bodies: Bearish HTF candles
* Label shows selected timeframe (e.g., "HTF→ D" for daily)
♦ Legend Table (bottom-right corner)
Quick reference guide explaining all symbol abbreviations and color codes used on the chart.
-----------------------------------------------------------------
Methodology & Calculation Details
This indicator consolidates multiple ICT/SMC analytical components into a single integrated system. While individual elements could be created separately, this integration provides automated coordination between components , consistency, and reduces chart complexity.
Structure Detection External and internal pivots
Are identified using fractal pivot analysis with configurable lookback periods (default: 20 bars for both). A pivot high is confirmed when the high at the pivot bar exceeds all highs within the lookback range on both sides. Pivot lows use inverse logic. Structure lines connect validated pivots, with color coding based on price direction (higher highs/higher lows = bullish, lower highs/lower lows = bearish).
Fibonacci Retracement Calculation
Users define two swing points via date/time inputs. The indicator calculates the price range between these points and applies standard Fibonacci ratios (0.0, 0.118, 0.214, 0.382, 0.5, 0.618, 0.786, 0.882, 1.0, plus extensions at 1.118, 1.272, -0.118, -0.272). Zone classification is based on ICT discount/premium principles: 0.618-1.0 range for bearish setups, 0.0-0.382 for bullish setups.
Imbalance Identification
Volume Imbalances : Detected using PVSRA (Price, Volume, Support, Resistance Analysis) methodology. Candles are classified based on the percentile ranking of volume and price range over a 1344-bar lookback period. Type 1 imbalances require ≥95th percentile in both volume and range; Type 2 requires ≥85th percentile. Additional filters include body-to-range ratio (≥50% for Type 1, ≥30% for Type 2) and ATR validation.
Fair Value Gaps (FVG) : Identified when a three-candle sequence shows a price gap: low > high for bullish FVG, high < low for bearish FVG. The middle candle must close beyond the gap edge. Mitigation occurs when the price retraces into the gap.
Order Blocks (OB) : Detected by identifying the last opposing candle before a significant price move. When price breaks a swing high/low, the algorithm scans backwards to find the candle with the highest high (bearish OB) or lowest low (bullish OB) before the breakout. When an OB is breached, it converts to a Breaker Block (BB).
Liquidity Pools (LP) : Identified by detecting equal highs or equal lows using a tolerance threshold based on ATR. Pivot highs/lows within this tolerance range are grouped. Equal highs create Buy-Side Liquidity (BSL) zones above the level; equal lows create Sell-Side Liquidity (SSL) zones below the level.
Wick Imbalances: Flagged when a candle's wick exceeds 1.0x ATR and comprises >50% of the total candle range. These represent rapid rejections or absorption events.
Kill Zone Liquidity: Tracks the high/low range during specific ICT-defined sessions (Asian: 19:00-00:00 NY, London: 02:00-05:00 NY, NY AM: 09:30-11:00 NY). At session close, BSL and SSL zones are created above/below the session range.
Change of Character (ChoCH) & Break of Structure (BoS)
ChoCH is detected when price breaks counter to the established structure (bearish structure broken upward = bullish ChoCH; bullish structure broken downward = bearish ChoCH). BoS occurs when price breaks in the direction of the established trend (bearish structure breaking lower = bearish BoS; bullish structure breaking higher = bullish BoS).
Trade Calculations
Stop Loss and Take Profit levels are calculated based on the entry position within the Fibonacci zone structure:
* Premium entries (0.786-1.0 for shorts / 0.0-0.214 for longs): SL at 1.118/-0.118 extension, TP structure weighted toward zone extremes
* Golden entries (0.618-0.786 for shorts / 0.214-0.382 for longs): SL at 1.0/0.0 boundary, TP structure balanced across range
Risk-to-reward ratios are calculated as blended values across all three take profit levels, weighted by position quantity splits.
Reference Level Calculations
* Pivot Points: Standard formula using previous day's high, low, and close: PP = (H + L + C) / 3
* Support/Resistance: R1 = 2×PP - L, S1 = 2×PP - H, with R2/S2 and R3/S3 calculated using range extensions
* ADR: 14-period simple moving average of daily high-low range, projected from current day's extremes
Momentum Analysis
EMA 14 and EMA 21 use standard exponential moving average calculations. Crossovers are detected when EMA 14 crosses EMA 21 within user-defined discount zones, with directional confirmation (cross under in bearish discount = short signal; cross over in bullish discount = long signal).
Why This Integration Matters
While components like EMA crossovers, pivot detection, or Fibonacci retracements exist as separate indicators, this system provides:
1. Coordinated Analysis : All components reference the same structural framework (user-defined trading zone)
2. Automated Mitigation Tracking : Imbalances are monitored continuously and removed when mitigated according to ICT principles
3. Contextual Alerts : Notifications are triggered only when conditions align within the defined structural context
4. Trade Parameter Automation : Stop loss and take profit calculations adjust dynamically based on entry positioning within the structure
5. Consistent Visual Display : All elements use a unified color scheme, labeling system, and z-order layering. This eliminates visual conflicts that occur when stacking multiple independent indicators (overlapping lines, label collisions, inconsistent transparency levels, conflicting color schemes).
This consolidation reduces the need to manually coordinate 8-10 separate indicators, eliminates redundant calculations across disconnected tools, and maintains visual clarity even when all components are displayed simultaneously.
-----------------------------------------------------------------
Disclaimer
1. Indicator Functionality and Purpose
This indicator is solely a technical analysis tool built upon established methodologies (Smart Money Concepts/ICT) and statistical calculations (Pivots, Fibonacci, EMAs). It is designed to assist experienced traders in visualizing complex data, streamlining the analytical workflow, and automating conditional alerting.
The indicator is NOT:
♦ Financial Advice: It does not provide personalized investment recommendations, solicited advice, or instruction on buying, selling, or holding any financial instrument.
♦ A Guarantee of Profit: The presence of a signal, alert, or trade plan output by this tool does not guarantee that any trade will be profitable.
♦ A Predictor of Future Prices: The tool calculates probabilities and potential scenarios based on historical data and current structure; it does not predict future market movements.
2. General Trading Risks and Capital Loss
♦ All trading involves substantial risk of loss. You may lose some or all of your initial capital. Leveraged products, such as futures, CFDs, and margin trading, carry a high degree of risk and are not suitable for all investors.
♦ Risk Acknowledgment: By using this indicator, you acknowledge and accept that you are solely responsible for all trading decisions, and you bear the full risk of any resulting profit or loss.
♦ Risk Management is Crucial: This indicator is an analytical tool only. You must employ independent risk management techniques (position sizing, stop-loss orders) tailored to your personal financial situation and risk tolerance.
3. Calculation Limitations and Non-Real-Time Data
The calculations performed by this indicator are based on the data provided by your charting platform (e.g., TradingView).
♦ Data Accuracy: The accuracy of the outputs (e.g., Price Delivery Arrays, Pivots, P&L projections) is dependent on the accuracy and real-time nature of the underlying market data feed.
♦ Latencies: Trade alerts and signals may be subject to minor delays due to server processing, internet connectivity, or charting platform performance. Do not rely solely on alerts for execution.
♦ Backtesting and Performance: Any depiction of past performance, including data visible on the chart, is not indicative of future results. Trading results will vary based on market conditions, liquidity, and execution speed.
4. Software and Platform Disclaimer
"As Is" Basis: The indicator is provided on an "as is" basis without warranties of any kind, whether express or implied. The author does not guarantee the script will be error-free or operate without interruption.
Third-Party Integration: This indicator is not affiliated with, endorsed by, or connected to TradingView, 3Commas, or any other broker or execution platform. All third-party names are trademarks of their respective owners. The formatting of the Trade Summary Table for 3Commas is for user convenience only.
5. Required Competency (User Responsibility)
This indicator is built on the assumption that the user is an experienced trader with a working understanding of the complex concepts being visualized (ICT/SMC, FVG, Order Blocks, Liquidity, etc.). The indicator does not teach these concepts.
You Must Always Do Your Own Research (DYOR) before making any trading decision based on signals or visualization provided by this tool.
By installing and using this indicator, you explicitly agree to these terms and assume full responsibility for all trading activity.
QT Previous Micro Cycle Range + SSMT [bilal]Previous Micro Cycle Range + SMTs - Indicator Description
📊 Overview
This indicator tracks 22.5-minute micro cycles within ICT's Quarterly Theory framework and automatically detects Smart Money Technique (SMT) divergences across correlated indices (NQ, ES, YM). It visualizes previous cycle ranges and identifies high-probability manipulation completions for precise intraday entries.
🎯 What It Does
Micro Cycle Tracking:
Divides each 90-minute session into four 22.5-minute micro quarters
Plots the previous micro cycle's High, Low, Equilibrium (EQ), and Quarter levels
Updates automatically as new micro cycles form
Works on any timeframe (recommended: 1-5 minute charts)
SMT Detection:
Compares current micro cycle vs previous micro cycle across NQ, ES, and YM
Detects Bearish SMT: Divergence at highs (signals distribution down)
Detects Bullish SMT: Divergence at lows (signals distribution up)
Draws visual SMT lines with directional arrows showing correlation/divergence
Optional SMT table showing all three indices' movements
💡 How To Use It
For Scalpers & Day Traders:
Wait for a new micro cycle to begin (lines will refresh every 22.5 minutes)
Watch for SMT formation in the current cycle
Bullish SMT = Buy signal (previous low is confirmed, expect move to previous high)
Bearish SMT = Sell signal (previous high is confirmed, expect move to previous low)
Key Concepts:
Minimum Target: Opposite extreme of previous cycle
SMT Confirmation: One or two indices sweep a level while the other(s) fail to sweep
Best Results: Trade with higher timeframe bias aligned
⚙️ Features
Customizable Display:
Toggle High/Low lines with multiple label styles (Timeframe, Label, %, Fib)
Optional Equilibrium (50%) level
Optional Quarter levels (25% / 75%)
Optional extended range projections (±50% to ±400%)
Adjustable line colors, widths, and label sizes
SMT Options:
Enable/disable SMT detection
Show/hide SMT text labels
Custom colors for bullish/bearish SMTs
Option to delete previous cycle SMTs (keeps chart clean)
Real-time SMT table showing all three indices
Comparison Assets:
Default: ES1! and YM1! (customize to your preference)
Set correlation type for each asset (correlated vs inverse)
Disable individual assets if needed
🔍 Understanding The Visuals
Lines:
Solid lines = Previous cycle High/Low (where price came from)
Dotted lines = EQ and Quarter levels (internal cycle structure)
Green lines = SMT divergence detected (buy/sell signal)
Labels:
▲ = Asset made higher high/low vs previous cycle
▼ = Asset made lower high/low vs previous cycle
🔺 = Inverse correlation (up when others down)
🔻 = Inverse correlation (down when others up)
SMT Logic:
If indices diverge (move opposite directions), SMT is confirmed
Bearish SMT = Highs diverge → Sell
Bullish SMT = Lows diverge → Buy
📈 Best Practices
Use on 1-5 minute charts for optimal micro cycle visualization
Combine with higher timeframe bias (Daily Cycle SSMT, session bias, etc.)
Wait for SMT confirmation before entering trades
Target previous cycle's opposite extreme as minimum profit target
Exit when opposing SMT forms or price reaches target
🛠️ Settings Guide
Essential Settings:
Comparison Symbols: Set to the indices you trade (default: ES1!, YM1!)
Show Cycle SMT: Toggle SMT detection on/off
Delete Previous Cycles SMTs: Keep chart clean by removing old SMTs
Visual Preferences:
Line Color/Width: Customize previous cycle lines
Label Style: Choose between Timeframe (22.5m), Label (descriptive), % (percentage), or Fib (0-1)
Show High/Low: Toggle previous cycle extremes
Show EQ/Quarters/Extended Ranges: Add more reference levels as needed
⚠️ Important Notes
This indicator shows previous cycle ranges, not predictive future levels
SMTs are confirmation signals for manipulation completion
Always use proper risk management and combine with your trading plan
Best results when aligned with higher timeframe directional bias
🎓 Based On ICT Concepts
This indicator implements concepts from Inner Circle Trader (ICT):
Quarterly Theory (fractal time structure)
Micro cycles (22.5-minute quarters)
Sequential SMT (mechanical divergence confirmation)
Smart Money accumulation, manipulation, distribution (AMD)
Perfect for: Scalpers, day traders, and anyone using ICT's Quarterly Theory and SMT concepts for precise intraday entries.
Note: This is a study indicator (overlay=true). It does not generate buy/sell signals automatically - you must interpret SMT formations based on your trading strategy.RéessayerGu should know it only works on the 30s chart btwPrevious Micro Cycle Range + SMTs - Indicator Description
📊 Overview
This indicator tracks 22.5-minute micro cycles within ICT's Quarterly Theory framework and automatically detects Smart Money Technique (SMT) divergences across correlated indices (NQ, ES, YM). It visualizes previous cycle ranges and identifies high-probability manipulation completions for precise intraday entries.
⚠️ IMPORTANT: This indicator is designed to work on the 30-second chart only. The micro cycle calculations are optimized for 30s timeframe data.
🎯 What It Does
Micro Cycle Tracking:
Divides each 90-minute session into four 22.5-minute micro quarters
Plots the previous micro cycle's High, Low, Equilibrium (EQ), and Quarter levels
Updates automatically as new micro cycles form every 22.5 minutes
Precise timing based on New York timezone session structure
SMT Detection:
Compares current micro cycle vs previous micro cycle across NQ, ES, and YM
Detects Bearish SMT: Divergence at highs (signals distribution down)
Detects Bullish SMT: Divergence at lows (signals distribution up)
Draws visual SMT lines with directional arrows showing correlation/divergence
Optional SMT table showing all three indices' movements in real-time
💡 How To Use It
Setup:
Switch to 30-second chart (required for accurate cycle timing)
Add indicator to your chart
Ensure you're viewing NQ, ES, or YM (or correlated futures)
For Scalpers & Day Traders:
Wait for a new micro cycle to begin (lines will refresh every 22.5 minutes)
Watch for SMT formation in the current cycle
Bullish SMT = Buy signal (previous low is confirmed, expect move to previous high)
Bearish SMT = Sell signal (previous high is confirmed, expect move to previous low)
Key Concepts:
Minimum Target: Opposite extreme of previous cycle
SMT Confirmation: One or two indices sweep a level while the other(s) fail to sweep
Best Results: Trade with higher timeframe bias aligned (Daily Cycle SSMT, session bias)
⚙️ Features
Customizable Display:
Toggle High/Low lines with multiple label styles (Timeframe, Label, %, Fib)
Optional Equilibrium (50%) level
Optional Quarter levels (25% / 75%)
Optional extended range projections (±50% to ±400%)
Adjustable line colors, widths, and label sizes
Line extension length (default: 15 bars ahead)
SMT Options:
Enable/disable SMT detection
Show/hide SMT text labels with ticker symbols and directional arrows
Custom colors for bullish/bearish SMT lines
Option to delete previous cycle SMTs (keeps chart clean)
Real-time SMT table showing all three indices' current status
Comparison Assets:
Default: ES1! and YM1! (customize to your preference)
Set correlation type for each asset (correlated vs inverse)
Disable individual assets if needed
Works with any correlated futures contracts
Debug Mode:
Toggle debug info to see current NY time, session, and micro cycle timing
Helpful for understanding cycle structure and troubleshooting
🔍 Understanding The Visuals
Lines:
Solid lines = Previous cycle High/Low (where price came from)
Dotted lines = EQ and Quarter levels (internal cycle structure)
Green lines (default) = SMT divergence detected (buy/sell signal)
Gray dotted lines = Extended range projections (if enabled)
Labels:
▲ = Asset made higher high/low vs previous cycle (correlated)
▼ = Asset made lower high/low vs previous cycle (correlated)
🔺 = Inverse correlation (up when others down)
🔻 = Inverse correlation (down when others up)
SMT Logic:
If indices diverge (move opposite directions), SMT is confirmed
Bearish SMT = Highs diverge → High is set, expect distribution down
Bullish SMT = Lows diverge → Low is set, expect distribution up
📈 Best Practices
Must use 30-second chart - indicator timing is calibrated for this timeframe
Combine with higher timeframe bias (Daily Cycle SSMT, 90-min SSMT, session bias)
Wait for SMT confirmation before entering trades (don't front-run)
Target previous cycle's opposite extreme as minimum profit target
Exit when opposing SMT forms or price reaches target
Best windows: Q2→Q3 or Q3→Q4 transitions within 90-minute sessions
Volatility injection times: Watch 09:30, 10:00, and 14:00 ET for strongest moves
🛠️ Settings Guide
Essential Settings:
Comparison Symbols: Set to the indices you monitor (default: ES1!, YM1!)
Correlation Type: Toggle "Correlated" on/off for each asset based on expected relationship
Show Cycle SMT: Enable/disable SMT detection
Show SMT Text: Toggle labels showing ticker divergence details
Delete Previous Cycles SMTs: Keep chart clean by removing old SMTs
Visual Preferences:
Line Color/Width: Customize previous cycle lines (default: black, width 1)
Label Style: Choose between:
Timeframe (shows "22.5m")
Label (descriptive: "previous micro cycle high/low")
% (shows "100%/0%")
Fib (shows "1/0")
Show High/Low: Toggle previous cycle extremes (recommended: ON)
Show EQ/Quarters/Extended Ranges: Add more reference levels as needed
SMT Customization:
SMT Colors: Customize bearish/bullish SMT line colors (default: green for both)
SMT Label Colors: Background and text color for SMT labels
SMT Table: Toggle real-time comparison table (bottom right)
⚠️ Important Notes
30-second chart required - will not work accurately on other timeframes
This indicator shows previous cycle ranges, not predictive future levels
SMTs are confirmation signals for manipulation completion, not entry triggers alone
Always use proper risk management and position sizing
Best results when aligned with higher timeframe directional bias
Monitor all three indices (NQ, ES, YM) for complete SMT picture
Micro cycles are part of a fractal structure - align with 90-min and Daily Cycle SMTs
🎓 Based On ICT Concepts
This indicator implements concepts from Inner Circle Trader (ICT):
Quarterly Theory (fractal time structure - 22.5 min micro quarters)
Micro cycles (four quarters within each 90-minute session)
Sequential SMT (mechanical divergence confirmation across correlated indices)
Smart Money AMD (Accumulation, Manipulation, Distribution pattern)
New York session timing (based on ICT's 6-hour daily cycles)
🕐 Micro Cycle Structure
Each 90-minute session divides into four 22.5-minute micro quarters:
Micro Q1: 00:00 - 22:30
Micro Q2: 22:30 - 45:00
Micro Q3: 45:00 - 67:30
Micro Q4: 67:30 - 90:00
This pattern repeats across all 16 daily 90-minute sessions (Q1.1 through Q4.4).
Perfect for: Scalpers and day traders using ICT's Quarterly Theory and SMT concepts for precise micro-level entries on 30-second charts.
Chart Requirement: 30-second timeframe only.
Note: This is a study indicator. It does not generate automatic buy/sell signals - you must interpret SMT formations based on your trading strategy and higher timeframe bias.
Crypto Schlingel - PVSRA POC EMA Suite v5.903The Chart Indicator Suite combines a wide range of powerful tools that help traders accurately analyze market structures, volatility, and key price zones. With indicators such as POC, pivot points, EMAs, VWAP, Bollinger Bands, and important market levels such as yesterday/weekly high & low, daily open, psy high/low, and ADR, the suite offers a comprehensive overview of trends and market behavior. Supplemented by pvsra candles, long candle detection, and the display of relevant stock market opening hours, it reliably supports traders in making informed trading decisions.
Indicators are configurable
All of the indicators mentioned are fully configurable and can be flexibly adapted to individual trading strategies. Users can freely adjust parameters, display types, and sensitivities to highlight exactly the market information that is relevant to their personal trading style.
The individual fields in the configuration are self-explanatory or are explained in a toolbar, so that the possible settings become clear.
POC
The Point of Control (POC) is a central concept in market profile and volume profile analysis and plays an important role in technical chart analysis. Here is a detailed description of its usefulness and significance:
Definition
The point of control (POC) is the price level at which the most trading volume has taken place within a certain period of time.
It therefore shows the price at which buyers and sellers were most active – the center of market interest.
📊 Use and significance in chart analysis
1. Central support and resistance zone
Since the largest volume was traded at the POC, this price is considered a “fair zone” or equilibrium price.
The market often reacts strongly to the POC:
Above the POC → potential resistance if the price is coming from below.
Below the POC → potential support if the price is falling from above.
Example: If the price returns to the POC, this can be an entry opportunity for traders betting on a market reaction.
2. Interpretation of market acceptance
A price range with high volume (including POC) shows where the market has accepted a fair value.
Low volume, on the other hand, indicates rejection or disinterest.
→ The POC therefore helps to distinguish between accepted price zones and transition areas.
PIVOT POINTS
Pivot points are predefined price levels calculated from the previous day's price data (or a previous time unit).
They help traders identify potential support and resistance zones for the current trading day (or period).
Benefits of pivot points in chart analysis
1. Determining support and resistance areas
The calculated pivot levels (P, S1, S2, R1, R2, etc.) show where the market is likely to react:
Supports (S1, S2, S3) → possible downward turning points.
Resistance (R1, R2, R3) → possible upward turning points.
These zones are often observed by many traders at the same time, making them self-fulfilling marks.
2. Trend determination and market sentiment
If the market opens above the pivot (P) and remains there → signals buying pressure.
If the market trades below the pivot (P) → signals selling pressure.
A break above R1 or below S1 may indicate a strong trend day.
EMA Exponential Moving Average
The EMA is the exponentially weighted moving average of a price.
It shows the average price of a security over a certain period of time, weighted according to recency – that is:
👉 more recent price data has more influence than older data.
This distinguishes it from the simple moving average (SMA), in which all values are weighted equally.
Benefits of the EMA in chart analysis -> Identifying trends
The EMA reacts more quickly to price changes than the SMA and is therefore ideal for:
Identifying trend reversals at an early stage
Confirming trend directions
👉 Rising EMA → Upward trend
👉 Falling EMA → Downward trend
Traders often use combinations such as:
EMA 50 / EMA 200 → Long-term trends
SIGNIFICANCE OF HIGHS AND LOWS
The daily high, daily low, weekly high, and weekly low are objective price zones that show:
Where the market bought (high) or sold (low) the most, and where supply and demand reached their extremes in the past period.
These levels often act as magnetic price zones in ongoing trading, where traders react (entry, profit-taking, or stop setting).
🎯 Use of yesterday's high and low (previous day high/low)
🔹Support and resistance levels
Yesterday's high often acts as resistance when the price comes from below.
Yesterday's low becomes support when the price falls from above.
➡️ Traders watch these levels closely to trade breakouts or reversals.
EMA 9 / EMA 20 → Short-term movements
🎯 Benefits of weekly highs and lows (Weekly High/Low)
Important structural markers in the higher time frame
Weekly highs and lows show medium to long-term market structure.
They are often considered stronger supports/resistances than daily levels.
➡️ For example, if the price breaks above the weekly high, this usually signals institutional interest and may indicate a continuation of the trend.
➡️ Conversely, failure to break above a weekly high may indicate market weakness or a reversal.
DAILY OPEN
The Daily Open is the price at which trading begins on a new day.
It marks the first price after the close of the previous trading session.
👉 In many markets (e.g., Forex, index futures, crypto), this is the starting point of daily price movement, where market direction and sentiment realign.
🎯 Benefits of the Daily Open in chart analysis
Direction indicator (daily bias)
The Daily Open serves as a neutral center line for the current trading day.
Traders use it to assess the market direction (bias):
Price above the Daily Open → bullish day (buyers dominate)
Price below the daily open → bearish day (sellers dominate)
📈 → If the daily open is broken and held above, this indicates upward momentum.
📉 → If it is broken below, this signals weakness.
This simple observation helps traders trade with the daily trend rather than against it.
STOCK MARKET OPENING HOURS
Every major stock exchange has defined trading hours during which institutional capital is active.
Examples (CET):
Asia (Tokyo/ Hong Kong) 1:00 a.m. – 9:00 a.m.
Europe (London/Frankfurt) 08:00 – 17:30
USA (New York) 15:30 – 22:00
Market dynamics change significantly during these time windows, as volume, liquidity, and volatility fluctuate depending on the session.
📈 Benefits in chart analysis
🔹Recognizing volatility and liquidity phases
At the start of a session (e.g., 9:00 a.m. in Frankfurt or 3:30 p.m. in New York), trading volume rises sharply.
This results in strong movements, often with changes in direction or breakouts.
👉 These phases are particularly suitable for:
Breakout strategies
Volume or momentum trades
Example:
If an index (e.g., DAX or S&P 500) reacts strongly at the US opening, this indicates institutional activity that may shape the rest of the day.
PSY HIGH AND PSY LOW
Psy High and Psy Low stand for:
Psychological High → the psychologically significant upper price level of a particular range
Psychological Low → the psychologically significant lower price level
These are often round numbers or striking price zones that market participants unconsciously use as a guide.
Examples:
For EUR/USD: 1.0500, 1.1000, 1.1500
For DAX: 17,000, 17,500, 18,000
For BTC/USD: 60,000, 65,000, 70,000
Traders also refer to such levels as “big figures” or “round numbers.”
📊 Why are psy levels so important?
Because they are based on human perception and market psychology:
👉 People think in round numbers, not in decimals such as 1.1037 or 17.264.
That's why:
Private investors often place their stop losses or take profits just above or below these levels, Institutional traders place large limit orders in these zones, and Algorithms react to the liquidity created there.
→ This results in increased volume, reaction patterns, and price movements at these levels.
ADR (Average Daily Range)
The ADR measures the average daily trading range of a market over a specific period of time – i.e., how many points, pips, or dollars the price typically moves per day.
Example:
If the DAX has moved an average of 180 points per day over the last 14 days, the ADR(14) = 180.
🎯 The benefits of ADR in chart analysis
🔹 Assessment of daily volatility
The ADR shows how much a market typically moves per day.
→ This allows you to see whether the current day is more volatile or calmer than normal.
Interpretation – Meaning
Current range < ADR
→ Market is still moving within normal limits → Potential for further movement
Current range ≈ ADR
→ Daily target largely achieved → lower probability of significant expansion
Current range > ADR
→ Market overextended → increased probability of correction or consolidation
👉 This helps you to plan entries, price targets, and stops realistically.
VWAP (Volume Weighted Average Price)
The VWAP is the volume-weighted average price of a security for a specific period of time – usually per day.
👉 Unlike a simple moving average (e.g., EMA), the VWAP takes into account how much was actually traded – not just where the price was.
It therefore reflects the fair market value, taking into account the trading volume.
🎯 Benefits of VWAP in chart analysis
🔹 Determining the fair average price
The VWAP shows where the majority of the trading volume took place – i.e., the price that the majority of market participants actually paid.
➡️ This is the “fair price of the day.”
Price above VWAP → buyers dominate (bullish)
Price below VWAP → sellers dominate (bearish)
This information is particularly valuable for determining the intraday bias (direction of the day).
BOLLINGER BANDS
Bollinger Bands consist of three lines based on a moving average (usually SMA 20):
Middle band:
→ usually the 20-period SMA (simple moving average)
Upper band:
→ SMA + (2 × standard deviation)
Lower band:
→ SMA − (2 × standard deviation)
👉 This means that the bands “breathe” with volatility – they widen when the market is volatile and contract when the market is calm.
🎯 The benefits of Bollinger Bands in chart analysis
🔹 Measuring market volatility
The main function of Bollinger Bands is to visualize the volatility of a market:
Wide bands → high volatility → strong movement/trend phase
Narrow bands → low volatility → calm market/consolidation
📈 When the bands contract sharply (“Bollinger squeeze”) → often a harbinger of an impending breakout.
KAMA
The KAMA was developed by Perry J. Kaufman.
Unlike normal moving averages such as SMA or EMA, it dynamically adjusts its smoothing to market conditions:
Low volatility / strong trend → reacts faster to price movements
High volatility / sideways movement → reacts slower, reduces false signals
The core idea: adaptability instead of rigid smoothing.
🎯 Benefits of KAMA in chart analysis
🔹 Filtering out market noise
KAMA smooths out unnecessary price fluctuations (noise) that many normal indicators mistakenly interpret as signals.
➡️ This minimizes false signals in sideways phases, while real trends remain visible.
EXTRA LARGE WICKS
A wick (or wick) is the thin line above or below the candle body:
Top → Highest price during the period
Bottom → Lowest price during the period
Long wick → Significant rejection of the price at this extreme zone
Example: A long upper wick means that the price rose high but was then pushed back sharply.
🎯 Benefits of long wicks in chart analysis
🔹 Recognizing rejections and resistance
Long upper wick: Sellers did not allow the higher price → possible downward reversal
Long lower wick: Buyers defended the lower price → possible upward reversal
💡 The market “speaks” through these wicks: It shows where buyers or sellers are not giving in any further.
XAUMO Gap RetraceXAUMO Gap Retrace
Educational description for TradingView (English)
📘 EDUCATIONAL ONLY — NOT FINANCIAL ADVICE
This script is for study, training and back-testing ideas. It does NOT give guaranteed
buy/sell signals and must NOT be used to promote any “risk-free” or “fixed return” schemes.
────────────────────────────────
1) What does XAUMO Gap Retrace do?
────────────────────────────────
This indicator tracks a very specific price behaviour:
» After a bar closes (and is NOT a tweezer with the previous bar),
it “arms” a target at the previous bar’s High or Low.
» It then watches to see if the market retraces to that level
on the next bar (or later, depending on your setting).
» When price touches that previous High/Low, it marks the fill,
updates a live label with distance and progress, and can fire an alert.
In simple terms:
“Every candle that closes away from the previous candle
gets a ‘magnet’ at the previous High or Low.
XAUMO Gap Retrace tells you if the very next candle comes back
to fill that gap to the previous bar.”
────────────────────────────────
2) Core logic step-by-step
────────────────────────────────
(1) Tweezer detection
• It calculates:
– prevH = previous bar’s High
– prevL = previous bar’s Low
– tol = toleranceTicks × syminfo.mintick
• If the current bar’s High or Low is within “tol” of the previous High or Low,
it is treated as a tweezer:
isTweezer = highs or lows almost equal to previous bar.
• Tweezer bars are ignored (no new target armed) to avoid noise.
(2) Target selection (Midline vs Nearest)
When a bar closes (barstate.isconfirmed) and it’s not a tweezer:
• Mode = "Midline"
– prevMid = (prevH + prevL) / 2
– If close >= prevMid → target = prevH (previous High)
– Else → target = prevL (previous Low)
• Mode = "Nearest"
– target = whichever is nearer to the close:
• prevH or prevL
The chosen level is stored in:
• lastTarget = the price level we are waiting to be filled
• lastSigIndex = bar_index of the signal candle
• needUp = true if close < target (price must go up to fill)
false if close > target (price must go down)
• baseDist = |close - target| at the signal bar
(used later to compute “progress”).
(3) Active state and fill detection
• isArmed = lastTarget is not na (we have a live target).
• isNextBar = bar_index == lastSigIndex + 1.
• isActive =
– if nextBarOnly = true → only the immediate next bar is allowed
– if nextBarOnly = false → any bar after the signal is active.
Price-touch rule:
• If needUp = true → fill when high >= lastTarget.
• If needUp = false → fill when low <= lastTarget.
This gives:
• fillNow = true on the bar where the previous High/Low is touched.
(4) Target line and fill marker
• plot() draws a line at lastTarget (with linebreak style) while armed.
• plotshape() draws a tiny circle at the touch price when fillNow is true,
labelled “fill”.
(5) Live distance / progress label
A single live label (liveLbl) shows live stats on the last bar:
• dist = |close - lastTarget|
• distTicks = dist / tick
• progress = how far the market has moved towards the target since the signal:
– 0% = no progress
– 100% = fully filled
(internally clamped between 0 and 1 with a custom clamp function).
If showLabel is ON, on the last bar:
• Old label is deleted,
• New label is created at (bar_index + liveLabelShift, close),
so it appears shifted to the right by N bars.
• Text includes:
– Target price
– Distance in price and ticks
– Progress %
– Direction text “↑ need up” or “↓ need down”.
(6) Alerts
• alertcondition(fillNow, ...) triggers when the previous High/Low
is touched according to the rules above.
• You can connect this to TradingView alerts to be notified when
the gap retrace happens.
(7) Auto-reset (when nextBarOnly = true)
• After the “next bar” closes, if the target is still armed,
the script clears:
– lastTarget
– baseDist
so that a new signal can be armed on future bars.
────────────────────────────────
3) Inputs summary
────────────────────────────────
• Tweezer tolerance (ticks)
– How close highs or lows can be to be considered a tweezer (skip signal).
• Target selection
– "Midline": choose High or Low based on whether close is above/below midpoint.
– "Nearest": choose whichever of prev High/Low is closer to the close.
• Only allow fill on the following bar
– If true: only the very next bar can fill the target.
– If false: any later bar can fill it.
• Show target line
– Draw/Hide the H/L target line.
• Show signal/fill markers
– Draw/Hide the small circle marker on fill.
• Show live distance label
– Turn the floating label ON/OFF.
• Live label → shift right (bars)
– Horizontal shift in bars for the live label (default 3 bars to the right).
────────────────────────────────
4) How to use it (educational view)
────────────────────────────────
XAUMO Gap Retrace is a study tool for:
• Testing how often a candle “comes back” to revisit the previous bar’s High/Low.
• Studying behaviour of retracements after a non-tweezer move.
• Combining gap-retrace logic with your own system:
– support/resistance
– VWAP / FVRP
– volume / delta
It is NOT meant to be traded blindly. It’s a microscope for one specific
price pattern: “does the next bar retrace to the previous bar’s H/L?”
────────────────────────────────
5) Risk & scam awareness
────────────────────────────────
• No script can guarantee profit or remove risk.
• Past retrace behaviour does not guarantee future behaviour.
• Never send money or account credentials to anyone claiming they can
use this indicator to give “fixed income” or “guaranteed returns”.
• Always test ideas, manage your own risk, and trade only money you
can afford to lose.
================================================
XAUMO Gap Retrace
وصف تعليمي بالعربي لمكتبة TradingView
📘 الاسكريبت تعليمي فقط — مش توصية شراء أو بيع
الهدف إنك تذاكر سلوك السعر وتعمل باك-تست، مش إنك تاخد منه أرباح مضمونة.
ممنوع استخدامه في أي دعاية نصب أو وعود كاذبة.
────────────────────────────────
١) الاسكريبت ده بيعمل إيه؟
────────────────────────────────
XAUMO Gap Retrace بيراقب سلوك معيّن:
• بعد ما الشمعة تقفل (وبتكون مش تويزر مع الشمعة اللي قبلها)
الاسكريبت “يسلّح” Target عند هاي أو لو الشمعة السابقة.
• بعد كده يبص: هل الشمعة اللي بعدها (أو اللي بعدهم لو حابب)
رجعت لمست الهاي/اللو بتوع الشمعة اللي فاتت ولا لأ؟
• لو اتلمس الهاي/اللو:
– بيحط علامة “fill”
– يحدّث ليبل حيّ بمسافة السعر والتقدّم
– ممكن يضرب Alert لو أنت فعّلتها.
يعني بالعربي:
“كل شمعة تقفل بعيد شوية عن اللي قبلها، بنحطلها مغناطيس
عند هاي أو لو الشمعة اللي قبلها، وبنشوف هل الشمعة الجاية
هترجع تلمسه ولا لأ.”
────────────────────────────────
٢) المنطق الداخلي خطوة بخطوة
────────────────────────────────
(أ) كشف الـ Tweezer
• بيحسب:
– prevH = هاي الشمعة اللي قبل
– prevL = لو الشمعة اللي قبل
– tol = toleranceTicks × حجم التكة
• لو الهاي أو اللو الحالي قريب من الهاي/اللو اللي قبل
بمقدار tol → تعتبر Tweezer:
isTweezer = true
• في الحالة دي بنعدّي ومابنسلّحش Target عشان نتفادى النويز.
(ب) اختيار الهدف (Midline أو Nearest)
لو الشمعة اتأكدت (barstate.isconfirmed) ومش تويزر:
• لو Mode = "Midline":
– prevMid = (prevH + prevL) / 2
– لو close ≥ prevMid → الهدف = prevH (هاي السابق)
– غير كده → الهدف = prevL (لو السابق)
• لو Mode = "Nearest":
– الهدف = الأقرب للـ close بين prevH و prevL.
وبعدين يخزن:
• lastTarget = مستوى السعر اللي مستنّين اللمسة عنده.
• lastSigIndex = bar_index للشمعة اللي سلّحت الإشارة.
• needUp = true لو التارجت فوق الكلوز (السعر محتاج يطلع).
false لو التارجت تحت الكلوز (السعر محتاج ينزل).
• baseDist = المسافة الأصلية |close - target| عند شمعة الإشارة.
(ج) حالة التسلّح والFill
• isArmed = في Target شغّال؟
• isNextBar = إحنا في الشمعة اللي بعد الإشارة مباشرة؟
• isActive =
– لو nextBarOnly = true → بس الشمعة اللي بعد الإشارة مسموح تملأ.
– لو false → أي شمعة بعد الإشارة مسموح.
شرط اللمس:
• لو needUp = true → fill لما high ≥ lastTarget.
• لو needUp = false → fill لما low ≤ lastTarget.
ده بيطلع:
• fillNow = true على الشمعة اللي لمست فيها الهاي/اللو بتاع الشمعة السابقة.
(د) خط الهدف وعلامة الـ Fill
• plot() يرسم خط عند lastTarget طول ما الإشارة متسلّحة.
• plotshape() يرسم دايرة صغيرة مكتوب عليها “fill” وقت ما الشرط يتحقق.
(هـ) ليبل المسافة والتقدّم (لايف)
ليبل واحد حيّ liveLbl يوضح إيه اللي بيحصل حاليًا:
• dist = |close - lastTarget|
• distTicks = dist ÷ حجم التكة
• progress = التقدم من ٠٪ لحد ١٠٠٪ من المسافة الأصلية:
– ٠٪ = لسه ما اتحركناش ناحية الهدف
– ١٠٠٪ = تم ملء الهدف
(محسوبة بـ clamp عشان نفضل بين ٠ و١).
لو showLabel شغّال وعلى آخر شمعة:
• يمسح الليبل القديم (لو موجود)
• يرسم ليبل جديد عند:
bar_index + liveLabelShift, close
يعني مزحزح الليبل كذا شمعة قدام على الشارت.
• النص بيعرض:
– Target
– Dist + Dist in ticks
– Progress٪
– سهم واتجاه: "↑ need up" أو "↓ need down".
(و) التنبيهات (Alerts)
• alertcondition(fillNow, ...) بتضرب لما الهدف (هاي/لو الشمعة السابقة)
يتلمس حسب القاعدة.
• تقدر توصلها بألارم على TradingView عشان يجيلك نوتيفيكيشن أول ما
يحصل Retrace.
(ز) إعادة ضبط أوتوماتيكي (لما nextBarOnly = true)
• بعد قفل الشمعة اللي بعد الإشارة، لو لسه فيه Target متسلّح:
– lastTarget = na
– baseDist = na
عشان يبقى جاهز يسلّح إشارة جديدة بعد كده.
────────────────────────────────
٣) أهم الإعدادات (Inputs)
────────────────────────────────
• Tweezer tolerance (ticks)
– مساحة التسامح في الهاي/اللو عشان نعتبرها تويزر ونسيبها.
• Target selection
– "Midline": يختار الهاي أو اللو حسب مكان الكلوز من منتصف الشمعة.
– "Nearest": يختار الأقرب للكلوز.
• Only allow fill on the following bar
– لو true: بس الشمعة اللي بعدها اللي تقول “اتملّى ولا لأ”.
– لو false: أي شمعة بعد كده ممكن تملّي الهدف.
• Show target line
– إظهار/إخفاء خط الهدف.
• Show signal/fill markers
– إظهار/إخفاء دائرة الـ fill.
• Show live distance label
– تشغيل/إيقاف الليبل اللايف.
• Live label → shift right (bars)
– تزحزح الليبل كام شمعة قدام (افتراضي ٣).
────────────────────────────────
٤) الاستخدام التعليمي
────────────────────────────────
مفيد لو عايز:
• تدرس: كام مرة الشمعة اللي بعد كده بترجع تلمس هاي/لو الشمعة اللي قبلها؟
• تشوف سلوك Retrace بعد حركة مش تويزر.
• تضيف المنطق ده لاستراتيجيتك:
– زونز، VWAP، FVRP، فوليوم، دلتا… إلخ.
مش معمول إنك تشتري/تبيع لوحده بمجرد ظهور إشارة.
────────────────────────────────
٥) مخاطر واحتيال
────────────────────────────────
• مفيش سكريبت بيشيل عنك المخاطرة.
• اللي حصل في الماضي مش ضمان للي جاي.
• إوعى حد يقول لك “ب XAUMO Gap Retrace هديك ربح ثابت”.
• ادير ريسكك بنفسك، جرّب الأول على ديمو، واتاجر بس بفلوس
تقدر تتحمل خسارتها.
================================================================
XAUMO Gap Retrace — Business Case (English)
Scenario: Post-selloff balance inside Implosion Box
📘 EDUCATIONAL ONLY — NOT FINANCIAL ADVICE
For TradingView idea / script description. Not a signal, not a promise of profit.
────────────────────────────────
1) What do we see on the chart?
────────────────────────────────
• Symbol: XAUUSD (gold CFD)
• TF: intraday (15m in the screenshot)
• XAUMO Implosion Box is active:
– Box High ≈ 4084.6
– Box Low ≈ 4065.5
Price is moving sideways inside this purple “implosion” range
after a strong Mega Bear waterfall.
• XAUMO Gap Retrace has armed a target at:
– Prev H/L Target ≈ 4077.12
– Live label says:
Target: 4077.12
Dist: 0.84 (64 ticks)
Progress: 71%
↓ need down
This means:
• The last “signal bar” closed ABOVE the chosen previous High/Low.
• The script selected 4077.12 as the magnet (previous H or L).
• Current price is still ABOVE that level, so we “need down”
for a full retrace.
• 71% of the original distance has already been eaten — most of
the gap has been retraced, a small part remains.
────────────────────────────────
2) What is the business case here?
────────────────────────────────
Context:
• We had aggressive selling (multiple Mega Bear tags) pushing price
from the upper green zone into the Implosion box.
• After the dump, price is no longer trending: it is compressing
between Box High and Box Low (implosion phase).
• Inside this box, XAUMO Gap Retrace is tracking small dislocations
between a bar’s close and the previous bar’s High/Low.
Current business case:
• The system is telling us:
“The last impulse away from the previous bar left a void at 4077.12.
The market has already retraced ~71% of that distance, but a
small downward move is still needed to fully ‘close the loop’.”
Educational interpretation:
• As long as price stays inside the Implosion Box, these small
retraces behave like micro mean-reversion trades: the market likes
to test old highs/lows inside the range before deciding whether to
break out (Explosion) or fully revert to the opposite side.
So the business case is:
> We are in a post-liquidation balance (Implosion box).
> XAUMO Gap Retrace shows an unfinished downside retrace to 4077.12.
> This supports a short-term mean-reversion idea INSIDE the box,
> not a blind breakout chase.
You still need:
• Your own trigger (price action / volume / order flow).
• Your own risk plan (SL, size, invalidation if Box High/Low breaks).
────────────────────────────────
3) Risk & scam awareness
────────────────────────────────
• XAUMO Gap Retrace does NOT guarantee that 4077.12 will be filled.
• Implosion boxes sometimes break violently without completing every
tiny retrace.
• Never sell this idea as “guaranteed fill” or “risk-free setup”.
• Always test, size properly, and trade only what you can afford to lose.
SHOW ME THE MONEY ya XAUMO…
but with discipline, risk limits, and zero tolerance for scams.
=========================================================
XAUMO Gap Retrace — الحالة دي بتقول إيه؟ (عربي)
📘 تنبيه مهم:
الشرح ده تعليمي بس، مش توصية شراء أو بيع، ومش وعد بأي ربح.
ممنوع استخدامه في دعاية نصب أو “أرباح مضمونة”.
────────────────────────────────
١) إيه اللي باين على الشارت؟
────────────────────────────────
• الأداة: XAUUSD
• الفريم: إنترادي (١٥ دقايق في الصورة)
• صندوق XAUMO Implosion شغّال:
– Box High حوالي 4084.6
– Box Low حوالي 4065.5
السعر بيتحرّك رايح جاي جوّه البوكس البنفسجي بعد نازلة
جامدة (Mega Bear) من المنطقة الخضرا فوق.
• XAUMO Gap Retrace مسلّح هدف عند:
– Prev H/L Target ≈ 4077.12
– الليبل كاتب:
Target: 4077.12
Dist: 0.84 (64 ticks)
Progress: 71%
↓ need down
يعني:
• شمعة الإشارة قفلت فوق الهاي/اللو اللي الاسكريبت اختاره.
• التارجت 4077.12 هو هاي أو لو الشمعة اللي قبلها.
• السعر دلوقتي لسه فوق التارجت، فـ “محتاج ينزل” عشان يكمّل الـ Retrace.
• ٧١٪ من المسافة الأصلية اتحركت بالفعل، فاضل جزء صغير من الجاب.
────────────────────────────────
٢) الـ Business Case هنا إيه؟
────────────────────────────────
الخلفية:
• كان فيه بيع عنيف من فوق (Mega Bear) نزّل السعر لحد جوّه
صندوق الـ Implosion.
• بعد النزلة، السوق دخل في حالة توازن/كومبريشن بين Box High و Box Low.
• جوّه البوكس، XAUMO Gap Retrace بيتابع كل مرة الشمعة تقفل
بعيد عن هاي/لو الشمعة اللي قبلها وبيشوف: هل الشمعة الجاية
هترجع تلمس المستوى ده ولا لأ.
في اللحظة دي:
• السيستم بيقول لك:
“فيه حركة طالعة فوق سببت فجوة صغيرة لحد 4077.12.
أغلب المسافة اتردّت (حوالي ٧١٪)، لسه ناقص نزلة بسيطة
عشان نقفل الدورة على الآخر.”
القراءة التعليمية:
• طول ما السعر جوّه صندوق الـ Implosion، الحركات دي غالبًا
Mean-Reversion جوّه الرينج: السوق يحب يختبر الهاي/اللوهات
القديمة جوّه البوكس قبل ما يقرر:
– يكسر لفوق (Explosion Up)
– أو يكمل نزلة لتحت.
فالـ Business Case:
> إحنا في توازن بعد نزلة قوية (Implosion Box).
> XAUMO Gap Retrace بيقول لسه فيه Retrace ناقص لتحت لحد 4077.12.
> الفكرة أقرب لتريدات رينج/Mean-Reversion جوّه البوكس،
> مش مطاردة بريك أوت عشوائي.
بس لسه محتاج:
• تأكيد دخول من طريقتك (برايس أكشن / فوليوم / فلو).
• خطة ريسك واضحة (ستوب، حجم عقد، إلغاء الفكرة لو Box High/Low اتكسر).
────────────────────────────────
٣) مخاطر واحتيال
────────────────────────────────
• مفيش ضمان إن السعر لازم يلمس 4077.12.
• ساعات صندوق الـ Implosion بيتكسّر بعنف من غير ما كل Retrace
صغير يكتمل.
• إوعى حد يقول لك “كل هدف Gap Retrace بيتملّي ١٠٠٪” — ده نصب.
• دايمًا جرّب، اتحكّم في حجمك، واتاجر بس بفلوس تقدر تستحمل خسارتها.
SHOW ME THE MONEY يا XAUMO…
بس بالعقل، وبريسـك مانجمنت، ومن غير ولا وعد كدب.
DeltaFlow Matrix═════════════════─────────
DELTAFLOW MATRIX - COMPLETE GUIDE
For 1-Minute Scalping
═════════════════─────────
───────────────────────────────────────
📊 VISUAL ELEMENTS EXPLAINED (What You See on the Chart)
───────────────────────────────────────
🟦🟥 RED/GREEN BARS ON THE RIGHT = Delta Flow Direction
The horizontal bars extending right from your chart show WHO controlled the price at each level. Green = bulls won, Red = bears won. Longer bars = more volume traded at that price. Example: If BTC is at $100,000 and you see a massive green bar, that means buyers aggressively absorbed all sell orders at that exact price level.
📊 GRADIENT BACKGROUND (Heat Map) = Volume Intensity
The colored background behind the bars shows volume concentration. Darker/more opaque = heavy trading, lighter/transparent = light trading. Example: A dark background at $99,800 means that's where most traders are positioned - it's a "magnet price" where BTC keeps returning.
🟩 GREEN BOX WITH BORDER = POC (Point of Control)
This is THE most important price on your chart - where the absolute highest volume traded. This is where the majority of traders are stuck. Example: POC at $99,950 means most BTC holders bought/sold there. Price will be magnetically pulled back to test this level repeatedly.
⬜ WHITE DOTTED LINES = VA High and VA Low (Value Area)
These lines contain 70% of all trading volume. Think of them as "fair price boundaries." Example: VA High at $100,200, VA Low at $99,700 means BTC's "fair value range" is $99,700-$100,200. Breakouts above/below these lines are significant moves.
💜 MAGENTA BORDER ON BARS = MICRO-SR (Micro Support/Resistance)
These magenta-outlined bars mark high-frequency support/resistance zones where price repeatedly bounced. These are your scalping zones. Example: MICRO-SR at $99,975 means BTC touched this price multiple times in the last 100 bars - it's a critical battle line for 1-minute scalpers.
🟡 GOLD TEXT "BULL EXHAUST" / "BEAR EXHAUST" = Exhaustion Zones
When one side dominated the volume BUT the trend is dying. This is where the big money got tired. Example: "BULL EXHAUST" at $100,100 means buyers pushed hard but are running out of steam - expect a reversal or consolidation soon.
🔵 CYAN TEXT "FLOW SHIFT ↑" / "FLOW SHIFT ↓" = Institutional Reversal
This is the holy grail - when delta completely flipped from bearish to bullish (or vice versa) with increasing volume. This marks where institutions changed their position. Example: "FLOW SHIFT ↑" at $99,900 means selling pressure just turned into aggressive buying - the big players reversed direction.
🟠 ORANGE TEXT "FAILED SHIFT ↑" / "FAILED SHIFT ↓" = Failed Institutional Reversal
When a FLOW SHIFT appears but then gets rejected by the opposite side within 3-10 bars. This means institutions TRIED to reverse but couldn't - the other side is defending hard. Example: "FAILED SHIFT ↑" at $99,900 means bulls attempted to take control but bears defended and stopped the reversal - this is a bearish sign, price likely continues down.
🟢 GREEN "COILED" LABEL BELOW PRICE = Bullish Compression Setup
When price is compressed below VA Low with 5+ MICRO-SR resistance levels stacked overhead AND bullish momentum is building. This is a spring-loaded long setup - price is coiled under resistance ready to explode upward. Example: BTC at $99,700, VA Low at $100,000, 7 MICRO-SR levels stacked from $100,100-$100,400, and delta shows +45 with bullish flow → "COILED" appears. This means price is compressed like a spring with bullish pressure building - when it breaks, it will rip through all those overhead levels fast.
🔴 RED "COILED" LABEL ABOVE PRICE = Bearish Compression Setup
When price is extended above VA High with 5+ MICRO-SR support levels stacked below AND bearish momentum is building. This is a spring-loaded short setup - price is coiled above support ready to crash downward. Example: BTC at $100,500, VA High at $100,200, 6 MICRO-SR levels stacked from $100,000-$99,700, and delta shows -52 with bearish flow → "COILED" appears. This means price is compressed with bearish pressure building - when it breaks down, it will slice through all those support levels.
🔴🟢 "REJECT" LABEL = Failed Breakout / Rejection
When price enters a cluster zone (resistance or support) but shows opposite momentum - the breakout attempt failed. Example: Price pushed up into overhead resistance at $100,200 but delta turns bearish (-38) → "REJECT" appears in red above price. This means the breakout attempt was rejected, bulls who entered are trapped, expect reversal down.
⚠️ "WALL ↑" / "WALL ↓" = Resistance/Support Wall Alert
When 5+ MICRO-SR levels are stacked together creating a "wall" of resistance or support. These are significant barriers where price will likely stall or reverse. Example: "WALL ↑ 7x" means there are 7 MICRO-SR resistance levels stacked above current price - breaking through this will be very difficult without strong momentum and volume.
🔴🟢 "BULL ATTACK" / "BEAR ATTACK" = Aggressive Momentum
One side is attacking with both high delta AND increasing volume. This is active warfare. Example: "BEAR ATTACK" at $100,050 means sellers are aggressively dumping with rising volume - price is likely to drop fast.
🛡️ "BULL DEFENSE" / "BEAR DEFENSE" = Holding the Line
One side has high delta but volume is flat or decreasing - they're defending a level, not pushing. Example: "BULL DEFENSE" at $99,850 means buyers are absorbing sells to prevent BTC from dropping further, but they're not strong enough to push up yet.
⚖️ "EQUILIBRIUM" / "ROTATION" = Balanced Market
Bulls and bears are equally matched - perfect for range trading, terrible for breakout trades. Example: "EQUILIBRIUM" at $100,000 means the market is perfectly balanced here - trade the range, don't chase breakouts.
📈📉 "UP" / "DN" ARROWS = Volume Trend
Small green "UP" or red "DN" labels show if volume is increasing or decreasing at that price level over time. Example: "UP" at $99,900 means more traders are entering positions at this price compared to earlier - this level is becoming more important.
⇈⇊ DOUBLE ARROWS = Delta Momentum Acceleration
These show when delta is accelerating rapidly - not just strong, but GETTING STRONGER. Example: ⇈ at $100,050 means bullish delta isn't just high, it's accelerating - expect explosive upward movement.
🟢🔴 VELOCITY BANDS (Horizontal bars far right) = Volume Acceleration
Thin horizontal bars extending from the profile show how fast volume is building. Green = volume accelerating up, Red = volume accelerating down. Example: Green velocity band at $100,100 means volume is spiking at this level right now - action is heating up.
💜 "x3.8" LABEL ABOVE CANDLE = Volume Spike Signal
Magenta text showing volume multiplier. Example: "x3.2" above a BTC candle means this candle had 3.2 times the average volume - something big just happened (news, liquidation cascade, whale entry).
🟢🔴 THICK LINE AT VA HIGH/LOW = Breakout with Momentum
When BTC breaks the VA line, the line changes:
- Thin line (width 2) = Weak breakout (<30Δ momentum)
- Medium line (width 3) = Medium breakout (30-60Δ)
- Thick dashed line (width 4) = STRONG breakout (>60Δ) - THIS IS THE FLASH
The label also changes: "VA High 72Δ V✓ STRONG" = 72 delta momentum, volume confirmed, strong breakout.
🔵 CYAN DASHED LINE AT POC = POC Bounce Flash
A short cyan dashed line appears when BTC bounces off the POC with a bullish reversal candle. This is your highest-probability long entry - the POC "magnet" just pulled price back and bulls are responding.
───────────────────────────────────────────────
🧠 PATTERN COMBINATIONS = Market Psychology (What Traders Are Thinking)
───────────────────────────────────────────────
🚀 PATTERN 1: "The Nitro Boost" (Highest Win Rate)
WHAT YOU SEE: FLOW SHIFT ↑ appears below current price + only MICRO-SR (magenta) levels above + Volume Spike (x2.5+)
PSYCHOLOGY: Big money just reversed from selling to buying. Retail still thinks it's going down. All the nearby resistance levels are weak (just micro-levels). The explosion in volume means someone BIG just entered.
EXAMPLE: BTC at $99,900, FLOW SHIFT ↑ just appeared, above you see MICRO-SR at $100,000, $100,050, $100,100 with no major resistance. Volume spike shows x3.1. → Institutions flipped bullish and the path of least resistance is UP. These MICRO-SR levels will be blown through like paper.
TRADE: Long immediately, targets at each MICRO-SR level, stop below the FLOW SHIFT price.
💎 PATTERN 2: "The Wall" (Reversal Setup)
WHAT YOU SEE: BULL/BEAR EXHAUST at a price level + Price approaching POC from above/below + Delta momentum arrows (⇊) pointing opposite to price movement
PSYCHOLOGY: One side pushed too hard and ran out of gas right as they're approaching the most important price level (POC). Delta momentum is reversing. The "wall" of volume at POC will reject them.
EXAMPLE: BTC pushed from $99,800 to $100,200, now "BULL EXHAUST" appears at $100,200. POC is at $100,000. You see ⇊ (bearish delta acceleration). → Bulls exhausted themselves pushing up, POC will act as resistance, bears are accelerating. Price will get rejected back down.
TRADE: Short at current price, target is POC at $100,000, stop above the exhaust level.
⚔️ PATTERN 3: "The War Zone" (Stay Out)
WHAT YOU SEE: BULL ATTACK and BEAR ATTACK labels alternating rapidly + EQUILIBRIUM or ROTATION at current price + VA lines very close together
PSYCHOLOGY: Bulls and bears are in full battle mode, neither side is winning. The market is chopping violently in a tight range. This is where retail gets destroyed by whipsaw.
EXAMPLE: BTC bouncing between $99,900-$100,100. "BULL ATTACK" at $100,000, "BEAR ATTACK" at $100,050, "EQUILIBRIUM" at $100,025. VA High at $100,100, VA Low at $99,900. → Pure chaos. Both sides throwing punches, nobody winning.
TRADE: STAY OUT. Wait for exhaustion or flow shift. If you must trade, use very tight ranges (buy at VA Low, sell at VA High, 5-tick stops).
🎯 PATTERN 4: "The Breakout Confirmation" (High Confidence)
WHAT YOU SEE: VA breakout with STRONG label + Volume spike (x2.0+) + FLOW SHIFT in breakout direction + No major resistance for 50+ ticks
PSYCHOLOGY: Every signal is aligned. Price broke the fair value range WITH strong momentum, WITH volume confirmation, WITH institutional flow reversal. This is the "perfect storm" breakout.
EXAMPLE: BTC breaks VA High at $100,200. Label changes to "VA High 68Δ V✓ STRONG" (thick dashed line). Volume spike shows x2.8. FLOW SHIFT ↑ appears at $100,210. Next resistance is MICRO-SR at $100,400. → This is as good as it gets. Institutions are buying, retail FOMO is coming, momentum is strong.
TRADE: Long on the breakout, targets at +100 ticks ($100,300), +200 ticks ($100,400), trail stop below the breakout candle.
🛡️ PATTERN 5: "The Failed Breakout" (Fade Setup)
WHAT YOU SEE: VA breakout with WEAK label + No volume spike + DEFENSE label appears (opposite side) + Delta momentum arrows pointing back into VA
PSYCHOLOGY: Price tried to break out but without conviction. No volume = no big players interested. The defending side is holding the line. Breakout traders are about to get trapped.
EXAMPLE: BTC breaks VA High at $100,200. Label shows "VA High 23Δ WEAK" (thin line). No volume spike. "BEAR DEFENSE" appears at $100,220. You see ⇊ (bearish acceleration). → Weak breakout, bears defending, momentum reversing. Bull breakout traders are trapped.
TRADE: Short the failed breakout, target is back inside VA (POC at $100,000), stop above the high.
🧲 PATTERN 6: "The POC Magnet" (Mean Reversion)
WHAT YOU SEE: Price far from POC (100+ ticks away) + Volume decreasing (DN arrows) + No ATTACK or FLOW SHIFT labels + MICRO-SR levels between current price and POC
PSYCHOLOGY: Price overextended from the most important level. No new aggressive volume is coming in. Market is tired. Like a rubber band, price will snap back to POC where most traders are positioned.
EXAMPLE: BTC at $100,350, POC at $100,000 (350 ticks away). "DN" arrows showing volume declining. "ROTATION" at current price. MICRO-SR at $100,300, $100,200, $100,100. → Overextended, running out of steam, POC will pull it back.
TRADE: Short with targets at each MICRO-SR level on the way down to POC, final target at POC itself.
💥 PATTERN 7: "The Liquidation Cascade" (Momentum Continuation)
WHAT YOU SEE: Multiple consecutive candles with volume spikes (x2.5+) + ATTACK label same direction + Delta momentum arrows same direction (⇈ or ⇊) + Breaking through MICRO-SR levels without stopping
PSYCHOLOGY: Liquidations are triggering more liquidations. Stop losses are getting hit, triggering more stop losses. This is a cascade - it won't stop until hitting POC or VA boundary. Retail is getting destroyed, institutions are feasting.
EXAMPLE: BTC drops from $100,200. Candles show x2.7, x3.1, x2.9 volume spikes. "BEAR ATTACK" at every level. ⇊ arrows accelerating. MICRO-SR levels at $100,100, $100,000, $99,900 all getting destroyed. POC at $99,750. → Liquidation cascade in progress. Won't stop until POC.
TRADE: If you're in the direction, hold until POC. If not in, wait for POC to enter counter-trend. DO NOT try to catch this knife early.
🔄 PATTERN 8: "The Reversal Confirmation" (Highest Probability Entry)
WHAT YOU SEE: POC Bounce Flash (cyan dashed line) + FLOW SHIFT in new direction + Volume spike + Price bouncing off POC with bullish/bearish engulfing candle
PSYCHOLOGY: Price hit the most important level (POC) and institutions just reversed direction. This is THE signal. The magnet worked, price came back to POC, and big money is now pushing it the other way.
EXAMPLE: BTC drops to POC at $100,000. Cyan dashed POC bounce flash appears. Bullish engulfing candle. "FLOW SHIFT ↑" appears. Volume spike x2.6. → Perfect reversal setup at the most important price level with institutional confirmation.
TRADE: Long at POC, target next MICRO-SR or VA High, stop below POC. This is your highest win-rate setup.
🎪 PATTERN 9: "The Fake-Out Trap" (Avoid or Fade)
WHAT YOU SEE: FLOW SHIFT appears + No volume spike + EXHAUST label appears within 3-5 candles same direction + Delta momentum arrows reverse
PSYCHOLOGY: Someone tried to fake a reversal (maybe a whale painting the tape) but there's no real follow-through. The move exhausted immediately. Traders who followed the FLOW SHIFT are about to get trapped.
EXAMPLE: "FLOW SHIFT ↑" appears at $99,950. No volume spike. Within 3 candles, "BULL EXHAUST" appears at $100,000. ⇊ arrows appear. → False reversal, trap set, traders entering longs are getting baited.
TRADE: Fade it. Short when exhaust appears, target back below the fake FLOW SHIFT level.
🏆 PATTERN 10: "The Perfect Storm Long" (All Systems Go)
WHAT YOU SEE: Price above POC + FLOW SHIFT ↑ + VA Low breakout with STRONG + Volume spike + Only MICRO-SR resistance above + BULL ATTACK label + ⇈ acceleration
PSYCHOLOGY: Everything aligned bullish. Institutions buying, momentum strong, volume confirming, path clear. This is when retail FOMO kicks in and you get the biggest moves.
EXAMPLE: BTC at $100,100. POC at $100,000 (above POC ✓). "FLOW SHIFT ↑" at $100,050 ✓. "VA Low 71Δ V✓ STRONG" breakout ✓. Volume x3.4 ✓. MICRO-SR at $100,300, $100,500 (weak resistance) ✓. "BULL ATTACK" ✓. ⇈ arrows ✓. → Every single bullish signal firing. This is the setup you wait for all day.
TRADE: Long with size, targets at +200 ticks minimum, trail aggressively, stop only if FLOW SHIFT reverses.
🎯 PATTERN 11: "The Coiled Spring" (High Probability Breakout)
WHAT YOU SEE: "COILED" label appears + 5-8 MICRO-SR levels stacked in breakout direction + Delta +30 or higher (for long) / -30 or lower (for short) + Price compressed below VA Low (long) or above VA High (short)
PSYCHOLOGY: Price is compressed in a weak position with heavy resistance/support overhead, BUT institutions are building momentum in the direction of the breakout. When it breaks, all those clustered MICRO-SR levels will be blown through rapidly because the spring is loaded. This is the setup where you get 100-200 tick moves in minutes.
EXAMPLE: BTC at $99,650. VA Low at $100,000. "COILED" (green) appears below price. WALL ↑ 8x showing 8 MICRO-SR levels from $100,100-$100,800. Delta shows +47. FLOW SHIFT ↑ just appeared. → Price is coiled below massive resistance wall with strong bullish momentum building. When VA Low breaks, the spring releases and price will rip through all 8 resistance levels.
TRADE: Long when price breaks VA Low with volume confirmation, targets at each MICRO-SR cluster (+100, +200, +300 ticks), trail stop below breakout candle. This is your "moonshot" setup.
🛑 PATTERN 12: "The Failed Shift Trap" (Fade Setup)
WHAT YOU SEE: "FAILED SHIFT ↑" or "FAILED SHIFT ↓" appears + Strong opposite momentum (⇊ for failed bull shift, ⇈ for failed bear shift) + No volume spike + Price back in original range
PSYCHOLOGY: Institutions attempted a reversal but the other side defended hard and rejected it. Traders who followed the FLOW SHIFT are now trapped. The failed reversal confirms the original trend will continue - the defending side is in control.
EXAMPLE: BTC pushed from $100,200 to $99,900. "FLOW SHIFT ↓" appeared at $100,100 signaling bearish reversal. Within 5 bars, bulls defended at $99,850, pushing price back to $100,000. "FAILED SHIFT ↓" now appears at $100,100 with ⇈ (bullish acceleration). → Bears tried to reverse trend but failed. Bulls defended successfully. Original uptrend continues.
TRADE: Fade the failed shift. If "FAILED SHIFT ↓" appears, go long (bulls won the battle). If "FAILED SHIFT ↑" appears, go short (bears won). Target is back to the other side of the range.
⚠️ PATTERN 13: "The Wall Collision" (High Risk, High Reward)
WHAT YOU SEE: "WALL ↑" or "WALL ↓" with 6+ levels + Price approaching wall with strong momentum (ATTACK label) + Volume spike + Delta accelerating (⇈ or ⇊)
PSYCHOLOGY: Unstoppable force meeting immovable object. Price is charging at a massive wall of resistance/support with strong momentum. Either it breaks through explosively OR it gets rejected violently. This is binary - huge win or huge loss.
EXAMPLE: BTC at $100,050 with "BULL ATTACK" and ⇈ arrows. Volume x3.2. Approaching "WALL ↑ 9x" at $100,200-$100,600. POC at $100,300 (inside the wall). → Bulls charging at massive resistance wall with strong momentum. If they break through, it's explosive. If rejected, crash back down.
TRADE: ADVANCED ONLY. Wait for the collision. If price breaks through wall with FLOW SHIFT confirmation + volume spike, go long immediately with tight stop. If price gets REJECTED (bearish delta appears at wall), short immediately targeting POC. DO NOT enter before knowing the outcome.
🔄 PATTERN 14: "The Rejection Reversal" (Counter-Trend Entry)
WHAT YOU SEE: "REJECT" label appears + Price in cluster zone + Opposite side DEFENSE or ATTACK label appears + Delta momentum reverses (⇈ to ⇊ or vice versa)
PSYCHOLOGY: The breakout failed, trapped traders are exiting, and the opposite side is now attacking the weak hands. This creates fast moves back in the original direction.
EXAMPLE: BTC breaks VA High to $100,250. Weak volume, delta only +22. Enters overhead MICRO-SR cluster. "REJECT" appears in red. "BEAR DEFENSE" appears at $100,280. ⇊ arrows appear. → Breakout failed, bulls trapped, bears attacking. Price will reverse fast.
TRADE: Counter-trend entry in direction of REJECT. Short when "REJECT" appears with bearish confirmation, target is back to POC or VA Low. Stop above the rejection high. Fast scalp.
───────────────────────────────────────────────────────────────────────────────
⚡ QUICK REFERENCE CHEAT SHEET
───────────────────────────────────────────────────────────────────────────────
SAFEST ENTRIES (Highest Win Rate):
✅ POC Bounce Flash + FLOW SHIFT (Pattern 8)
✅ FLOW SHIFT + Only MICRO-SR above + Volume Spike (Pattern 1)
✅ Strong VA Breakout + Volume Spike + FLOW SHIFT (Pattern 4)
✅ COILED label + Multiple stacked MICRO-SR + Delta >30 (Pattern 11)
DANGER ZONES (Stay Out):
⛔ BULL ATTACK + BEAR ATTACK alternating (Pattern 3)
⛔ FLOW SHIFT + No volume + Quick exhaust (Pattern 9)
⛔ EQUILIBRIUM at current price with tight VA range
⛔ WALL collision without clear direction (Pattern 13 - wait for outcome)
FADE/REVERSAL SETUPS:
🔄 EXHAUST at price level + Approaching POC (Pattern 2)
🔄 Weak VA Breakout + DEFENSE opposite side (Pattern 5)
🔄 Price far from POC + Volume declining (Pattern 6)
🔄 FAILED SHIFT appears + Opposite momentum (Pattern 12)
🔄 REJECT label + Opposite ATTACK/DEFENSE (Pattern 14)
HOLD/MOMENTUM CONTINUATION:
🚀 Multiple volume spikes + ATTACK label + ⇈/⇊ arrows (Pattern 7)
🚀 All bullish/bearish signals aligned (Pattern 10)
🚀 COILED spring release through wall (Pattern 11)
═══════════════════════════════════════════════════════════
Remember: The indicator shows you WHERE the big money is (POC), WHAT they're doing (FLOW SHIFT), and HOW HARD they're doing it (volume spikes, momentum). Your job is to follow the big money, not fight them. When institutions shift, you shift. When they exhaust, you fade. When they're in a war, you stay out. Trade with the whales, not against them.
════════════════════════════════════════════════════════════
═══════════════════════════════════════════════════════════════════════════════
ENHANCED DELTA VOLUME PROFILE - TECHNICAL CALCULATIONS GUIDE
How Each Element is Actually Calculated
═══════════════════════════════════════════════════════════════════════════════
───────────────────────────────────────────────────────────────────────────────
🧮 CORE CALCULATIONS (The Math Behind What You See)
───────────────────────────────────────────────────────────────────────────────
📊 VOLUME BINS = Price range divided into 40 horizontal slices
The indicator takes the last 100 candles (configurable), finds the highest and lowest price touched, then divides that range into 40 equal "bins" (horizontal price levels). Each bin collects volume from candles that touched that price range. Example: BTC ranged from $99,500 to $100,500 in the last 100 bars. That's $1,000 range ÷ 40 bins = $25 per bin. Bin 1 = $99,500-$99,525, Bin 2 = $99,525-$99,550, etc.
🟦🟥 DELTA CALCULATION = (Bull Volume - Bear Volume) / Total Volume × 100
For each bin, the indicator separates bullish candles (close > open) from bearish candles (close < open). Delta = ((bull volume - bear volume) / total volume) × 100. This gives you a percentage from -100% (pure selling) to +100% (pure buying). Example: At $100,000, if 70 BTC was traded on green candles and 30 BTC on red candles, delta = ((70-30)/100) × 100 = 40% bullish.
🎨 GRADIENT COLOR = Delta converted to color spectrum
The delta percentage (-100 to +100) is mapped to a color gradient. -100% = pure bearish color (orange/red), 0% = neutral, +100% = pure bullish color (cyan/blue). The color you see on each bar directly represents the delta. Example: A bright cyan bar = high positive delta (strong buying), orange bar = high negative delta (strong selling), gray bar = balanced (delta near 0%).
🟩 POC (Point of Control) = Bin with the absolute highest total volume
The indicator sums up all volume in each of the 40 bins, then finds which bin has the most. That's your POC. Example: Bin 15 (around $100,000) collected 1,250 BTC of volume, which is more than any other bin. Bin 15 is your POC. This is where the most trading happened and where most traders are positioned.
⬜ VALUE AREA (VA) = The bins containing 70% of total volume, centered on POC
Starting from the POC, the indicator expands up and down, adding bins one at a time (choosing the bin with more volume each time) until it has captured 70% of all volume. The top of this range = VA High, bottom = VA Low. Example: POC at $100,000. Expanding out captures 70% of volume from $99,700 to $100,300. VA Low = $99,700, VA High = $100,300.
📈📉 VOLUME TREND = (Recent Volume - Old Volume) / Total Volume
The indicator splits your 100-bar lookback into three periods: Recent (last 15 bars), Mid (bars 15-30), and Older (last 15 bars of the 100). For each bin, it compares recent volume to older volume. If recent > older, trend is UP. If recent < older, trend is DOWN. Example: At $100,000, recent 15 bars had 80 BTC volume, older 15 bars had 40 BTC. Trend = (80-40)/(80+40) = 0.33 = UP. This shows volume is increasing at this level.
💜 MICRO-SR DETECTION = High volume (>60% of max) + High hits (>20% of max) + Active volume trend
A bin becomes MICRO-SR if: (1) Its volume is at least 60% of the highest-volume bin, (2) Price touched it frequently (at least 20% as many times as the most-touched bin), (3) Volume trend isn't flat (absolute trend > 0.05). Example: Bin at $99,975 has 750 BTC (75% of max), was hit 45 times (30% of max hits), volume trend = 0.08. = MICRO-SR (magenta border).
🟡 EXHAUSTION DETECTION = Extreme delta (>65%) + Declining volume trend (<-0.15) OR Extreme delta + Volume spike (>1.5× average)
Two ways to detect exhaustion: (1) One side dominated (delta > 65% or < -65%) BUT volume is decreasing (trend < -0.15), meaning participation is dropping. (2) Extreme delta WITH a huge volume spike (>1.5× average for that bin), meaning climactic volume. Example: At $100,200, delta = 72% bullish, but volume trend = -0.22 (declining). = BULL EXHAUST. Bulls won but are running out of steam.
🔵 FLOW SHIFT DETECTION = Delta changed sign (+ to - or - to +) + Delta change >40% + Volume trend increasing (>0.1)
Compares each bin's delta to the previous bin's delta. If delta flipped from negative to positive (or vice versa) by more than 40%, AND volume is increasing, = FLOW SHIFT. Example: Previous bin at $99,950 had -35% delta (bearish). Current bin at $100,000 has +45% delta (bullish). Change = 80% (flipped + exceeded 40%), volume trend = +0.15. = FLOW SHIFT ↑.
⇈⇊ DELTA MOMENTUM = Current delta - Average delta of last 3 bins
For each bin, the indicator looks at the previous 3 bins, calculates their average delta, then compares current delta to that average. If current delta is significantly higher/lower than the 3-bin average, momentum arrows appear. Example: Last 3 bins had deltas of 20%, 25%, 30% (average = 25%). Current bin delta = 55%. Momentum = 55 - 25 = +30 = ⇈ (strong bullish acceleration).
🟢🔴 VOLUME ACCELERATION = Rate of change of volume trend across three periods
Compares how volume changed from Old→Mid vs Mid→Recent. If Recent increased MORE than Mid did compared to Old, = positive acceleration. Formula: ((Recent-Mid) - (Mid-Old)) / |Mid-Old|. Example: Old=100, Mid=120, Recent=160. Mid increased by 20, Recent increased by 40. Acceleration = (40-20)/20 = 1.0 = strong acceleration (green velocity band).
⚖️ BALANCE SCORE = Combines volume balance, price range balance, and hit frequency
Three factors weighted equally: (1) How balanced is bull vs bear volume? (1 - |bull-bear|/total). (2) How tight is the price range? (1 - avgRange/maxRange). (3) How frequently was it hit? (hits/maxHits). Multiply these together. Score >0.7 = EQUILIBRIUM. Example: Volume is 55% bull / 45% bear = 0.9 balance. Range is tight = 0.8. Hit frequently = 0.85. Score = 0.9 × 0.8 × 0.85 = 0.61 = ROTATION.
📊 BULL/BEAR ATTACK/DEFENSE = Delta threshold (>60% or <-60%) + Volume trend direction
ATTACK = High delta (>60% either direction) + Volume trend increasing (>0.15). DEFENSE = High delta (>60% either direction) + Volume trend NOT increasing (≤0.15). Example: Delta = 68% bullish, volume trend = 0.22 = BULL ATTACK (buying with increasing volume). Delta = 68% bullish, volume trend = 0.05 = BULL DEFENSE (buying but volume not increasing).
───────────────────────────────────────────────────────────────────────────────
🎯 SIGNAL CALCULATIONS (The New Features)
───────────────────────────────────────────────────────────────────────────────
💜 VOLUME SPIKE = Current bar volume / 20-bar average volume
Takes the current candle's volume and divides it by the simple moving average of the last 20 candles' volume. If ratio >2.0 (configurable), spike detected. The label shows the exact multiplier. Example: Current candle = 450 BTC volume. 20-bar average = 140 BTC. Ratio = 450/140 = 3.21 = "x3.2" label appears in magenta above the candle.
🟢🔴 VA BREAKOUT MOMENTUM = POC bin's delta (absolute value)
When price breaks VA High or VA Low, the indicator looks at the POC bin's delta to measure momentum strength. Uses absolute value (ignore direction). <30 = WEAK, 30-60 = MED, >60 = STRONG. Line thickness and style change based on this. Example: BTC breaks VA High. POC bin delta = 72%. Momentum = 72 = STRONG. Line = width 4 (thick), dashed (flash effect), label shows "VA High 72Δ V✓ STRONG".
📊 BREAKOUT LINE THICKNESS = Momentum-based dynamic sizing
- Momentum <30: Line width = 2 (thin), solid line
- Momentum 30-60: Line width = 3 (medium), solid line
- Momentum >60: Line width = 4 (thick), dashed line (creates flash effect)
Example: Breakout with 45% momentum = width 3 solid line. Breakout with 75% momentum = width 4 dashed line (flashing).
✓ VOLUME CONFIRMATION = Current volume / 20-bar average >1.5
Checks if the breakout candle has strong volume. If current volume is at least 1.5× the 20-bar average, adds "V✓" to the label. Example: Breakout candle has 280 BTC volume, 20-bar average is 160 BTC. Ratio = 280/160 = 1.75 > 1.5 = "V✓" appears in label.
🔵 POC BOUNCE DETECTION = Price within 0.5 bin-step of POC + Bullish reversal candle + Previous candle was bearish
Three conditions must all be true: (1) Current close price is within half a bin's height from POC price. (2) Current candle is bullish (close > open). (3) Previous candle was bearish (close < open). If all true = POC bounce, cyan dashed flash line appears. Example: POC at $100,000, bin step = $25. Current close = $100,008 (within $12.50 of POC ✓). Current candle green ✓. Previous candle red ✓. = POC Bounce Flash.
───────────────────────────────────────────────────────────────────────────────
⚙️ TECHNICAL PARAMETERS (What You Can Adjust)
───────────────────────────────────────────────────────────────────────────────
🔢 LOOKBACK PERIOD (Default: 100 bars) = How much history to analyze
The number of candles backwards from current that get analyzed. More bars = more stable but slower to react. Fewer bars = more reactive but noisier. For 1-minute BTC scalping, 100 bars = last 100 minutes = 1 hour 40 minutes of data. Example: Setting to 50 bars makes it more reactive to recent action but less stable. Setting to 200 bars makes it smoother but slower to show new developments.
🎚️ NUMBER OF BINS (Default: 40) = Resolution of price levels
How many horizontal slices to divide the price range into. More bins = finer resolution but more noise. Fewer bins = smoother but less precise. 40 bins for 1-minute = good balance. Example: With $1,000 range, 40 bins = $25 per level. 20 bins would be $50 per level (less precise). 60 bins would be $16.67 per level (more precise but noisier).
📏 DISPLAY OFFSET (Default: 10 bars) = How far right the profile extends
How many bars to the right of current candle the volume profile displays. Purely visual - doesn't affect calculations. Example: Offset = 10 means the profile extends 10 bars to the right. Offset = 30 means it extends further right (more separation from candles).
📊 VOLUME TREND PERIOD (Default: 15 bars) = How many recent bars define "recent"
The number of bars considered "recent" vs "old" when calculating volume trends. Shorter = more sensitive to very recent changes. Longer = smoother trends. Example: 15 bars means "recent" = last 15 candles (last 15 minutes on 1m chart). Setting to 5 would make it hyper-reactive to the last 5 minutes. Setting to 30 would make it smoother.
🎯 EXHAUSTION THRESHOLD (Default: 65%) = How extreme delta must be for exhaustion
The minimum delta percentage to trigger exhaustion detection. Higher = more selective (only extreme cases). Lower = more signals but more false positives. Example: 65% means delta must be >65% or <-65% to qualify. Setting to 75% would only catch the most extreme exhaustion. Setting to 55% would catch more cases.
💜 MICRO-LEVEL THRESHOLD (Default: 60%) = How strong a level must be for MICRO-SR
The minimum volume percentage (relative to max) required for MICRO-SR detection. Higher = fewer, stronger levels. Lower = more levels but weaker. Example: 60% means bin must have at least 60% of the max bin's volume. Setting to 70% would show only the strongest levels. Setting to 50% would show more levels.
⚡ DELTA MOMENTUM PERIOD (Default: 3 bars) = How many bins to average for momentum
How many previous bins to average when calculating delta momentum. Shorter = more sensitive acceleration signals. Longer = smoother, less noisy. Example: 3 bins means compares current to average of last 3. Setting to 5 would smooth out momentum detection. Setting to 2 would make it more reactive.
🌊 FLOW SHIFT SENSITIVITY (Default: 40%) = Minimum delta change for flow shift
How much delta must change between consecutive bins to trigger FLOW SHIFT. Lower = more flow shift signals (more sensitive). Higher = fewer, stronger signals. Example: 40% means delta must flip by at least 40% (e.g., from -20% to +20% or from +10% to -30%). Setting to 60% would only catch major reversals. Setting to 25% would catch smaller shifts.
💥 VOLUME SPIKE THRESHOLD (Default: 2.0x) = Multiplier to trigger spike signal
How many times above average volume must be to show the spike label. Higher = fewer spikes shown (only extreme). Lower = more spikes shown. Example: 2.0× means current volume must be at least double the 20-bar average. Setting to 3.0× would only show massive spikes. Setting to 1.5× would show more moderate spikes.
🚀 BREAKOUT MOMENTUM MINIMUM (Default: 20%) = Minimum delta for breakout signal
How much delta momentum required at POC for VA breakout to trigger. Higher = fewer breakout signals (more selective). Lower = more signals but more false positives. Example: 20% means POC delta must be at least 20% (or -20%) when price breaks VA. Setting to 30% would only show strong breakouts. Setting to 10% would show weaker breakouts too.
───────────────────────────────────────────────────────────────────────────────
🔬 ADVANCED TECHNICAL DETAILS
───────────────────────────────────────────────────────────────────────────────
📐 BIN POSITIONING = Price-to-bin mapping formula
For any price P, its bin index = floor((P - MinPrice) / BinStep). BinStep = (MaxPrice - MinPrice) / NumBins. Example: Range $99,000-$100,000, 40 bins. BinStep = $1,000/40 = $25. Price $99,550 → Bin 22: (99,550 - 99,000) / 25 = 22.
📊 VOLUME DISTRIBUTION = Proportional allocation across bins
When a candle spans multiple bins, its volume is distributed proportionally based on how much of the candle's range overlapped each bin. Example: Candle from $99,950 to $100,050 (range = $100) with 50 BTC volume. Bin 1 ($99,950-$99,975) gets 25% of range = 12.5 BTC. Bin 2 ($99,975-$100,000) gets 25% = 12.5 BTC. Bin 3 ($100,000-$100,025) gets 25% = 12.5 BTC. Bin 4 ($100,025-$100,050) gets 25% = 12.5 BTC.
🎨 COLOR GRADIENT MAPPING = Delta to RGB conversion
Delta percentage is normalized to 0-1 scale (from -100/+100 range), then mapped to RGB gradient. -100% (0.0) = Full bearish color RGB. 0% (0.5) = Neutral gray. +100% (1.0) = Full bullish color RGB. Example: Delta = 60% → Normalized = 0.8 → 80% towards full bullish color (bright cyan).
⚖️ BALANCE SCORE FORMULA = Weighted geometric mean
BalanceScore = (VolumeBalance^w) × (PriceBalance^w) × (HitBalance^w), where w=weight (default 1.0). VolumeBalance = 1 - |BullVol - BearVol|/TotalVol. PriceBalance = 1 - AvgRange/MaxRange. HitBalance = Hits/MaxHits. Example: Vol=0.9, Price=0.8, Hit=0.7 → Score = 0.9 × 0.8 × 0.7 = 0.504.
🔄 DELTA HISTORY TRACKING = Rolling array per bin
Each bin maintains an array of its last N delta values (where N = delta momentum period). When calculating momentum, current delta is compared to the average of this array. Example: Bin's delta history = . Average = 25%. Current = 55%. Momentum = 55 - 25 = 30.
📈 VOLUME VELOCITY = Second derivative of volume
Measures acceleration of volume change. Recent change = (Recent - Mid). Old change = (Mid - Old). Acceleration = (Recent change - Old change) / |Old change|. Positive = accelerating. Negative = decelerating. Example: Old=100, Mid=150, Recent=220. Recent change = 70. Old change = 50. Accel = (70-50)/50 = 0.4 = 40% acceleration.
🎯 VA EXPANSION ALGORITHM = Greedy breadth-first from POC
Start at POC bin. While accumulated volume < 70% of total: Look at bin above and bin below POC boundary. Choose whichever has more volume. Add that bin to VA. Repeat. Example: POC at bin 20. Bin 21 (above) has 80 BTC, Bin 19 (below) has 95 BTC. Add bin 19. Now VA = bins 19-20. Next: Bin 21 has 80, Bin 18 has 70. Add bin 21. VA = bins 19-21. Continue until 70% captured.
⏱️ REAL-TIME UPDATES = Recalculates on every new bar close
The entire profile recalculates when barstate.islast = true (current bar). All 40 bins are cleared and rebuilt from scratch using the last N candles. This ensures the profile is always accurate to the current market state. Example: On 1-minute chart, the profile fully recalculates every 60 seconds when the new candle opens.
🎨 RENDERING OPTIMIZATION = 500-bar future limit management
TradingView limits drawing objects to 500 bars into the future. The indicator calculates safe offsets: maxFutureBar = bar_index + 499, then caps all box/line/label positions to stay under this limit. Example: Current bar_index = 1000. Max future = 1499. Display offset wanted = 200. Safe offset = min(200, 400 - 100) = min(200, 300) = 200 ✓ safe.
───────────────────────────────────────────────────────────────────────────────
💡 INTERPRETATION TIPS
───────────────────────────────────────────────────────────────────────────────
🔢 Understanding Percentages:
- Delta 0-30%: Weak bias, essentially balanced
- Delta 30-60%: Moderate bias, one side has control
- Delta 60-85%: Strong bias, one side dominated
- Delta 85-100%: Extreme bias, one-sided market (exhaustion likely)
📊 Volume Trend Interpretation:
- Trend -1.0 to -0.3: Strong decline in participation
- Trend -0.3 to -0.1: Moderate decline
- Trend -0.1 to +0.1: Stable/flat volume
- Trend +0.1 to +0.3: Moderate increase
- Trend +0.3 to +1.0: Strong increase in participation
🎯 Balance Score Ranges:
- 0.0-0.3: Heavily imbalanced, strong directional bias
- 0.3-0.5: Moderate imbalance, rotation forming
- 0.5-0.7: Balanced rotation zone
- 0.7-1.0: Perfect equilibrium, range-bound
⚡ Momentum Thresholds:
- <10: Negligible momentum change
- 10-20: Moderate acceleration
- 20-40: Strong acceleration (arrow appears)
- >40: Extreme acceleration (very rare, very significant)
═══════════════════════════════════════════════════════════════════════════════
Understanding these calculations helps you know WHY the indicator is showing what it's showing. When you see "FLOW SHIFT ↑", you now know it calculated a >40% delta flip with increasing volume. When you see MICRO-SR, you know that level has >60% of max volume, >20% of max hits, and active participation. When you see ⇈, you know delta jumped significantly above its 3-bin average. Use this knowledge to trust the signals and understand their strength.
═══════════════════════════════════════════════════════════════════════════════
LE ScannerGENERAL OVERVIEW:
The LE Scanner is a multi-ticker dashboard that scans up to 20 tickers in real time and displays their current trend, price, volume, and key level conditions directly on your chart. It tracks how each ticker interacts with both the Previous Day’s High/Low (PDH/PDL) and Pre-Market High/Low (PMH/PML) to determine whether price is breaking above, below, or remaining inside those levels. The indicator automatically classifies each ticker as Bullish, Bearish, or Neutral based on these break conditions.
This indicator was developed by Flux Charts in collaboration with Ellis Dillinger (Ellydtrades).
What is the purpose of the indicator?:
The LE Scanner helps traders keep track of up to 20 tickers at once without switching between charts. It puts all the key information in one place, including price, daily percentage change, volume, and how each ticker is reacting around the previous day’s and pre-market highs and lows. The layout is simple and easy to read, with progress bars that show where price is relative to those levels. The goal is to save time and make it easier to understand market strength and weakness across your watchlist.
What’s the theory behind the indicator?:
The LE Scanner is built around the idea that key levels define bias. The previous day’s high and low show where the market traded most actively during the prior session, and the pre-market range reveals how price behaved before the open. When a ticker breaks both the previous day’s high and the pre-market high, it shows that buyers are in control. When it breaks both the previous day’s low and the pre-market low, sellers are in control. If neither side has full control, the bias is seen as neutral.
LE SCANNER FEATURES:
Multi-Ticker Dashboard
Key Level Tracking
Trend Classification
Sorting
Customization
Multi-Ticker Dashboard:
The LE Scanner can monitor up to 20 tickers at the same time. Each ticker has its own row in the dashboard showing:
Ticker Name
Current Price
Volume
Daily % Change
PDH Break
PDL Break
PMH Break
PML Break
Trend (bullish, bearish, or neutral)
You can enable or disable each ticker individually, so if you only want to track 5 or 10 tickers, you can simply toggle the rest off. Each ticker input lets you type in any valid ticker that’s available on TradingView.
Ticker Name:
Shows the ticker you selected in your input settings
Current Price:
Displays the latest price of that ticker based on your chart’s selected timeframe.
Volume:
Tracks the total trading volume for the current session.
Daily % Change:
Measures how much price has moved since the previous session’s close.
The remaining elements of the dashboard are explained in full detail throughout the remaining sections of this write-up.
Key Level Tracking:
The core of the LE Scanner is its ability to track and visualize how price interacts with four key levels for every ticker:
Previous Day High (PDH)
Previous Day Low (PDL)
Pre-Market High (PMH)
Pre-Market Low (PML)
These levels are updated automatically and compared to the current market price for each ticker inputted into the indicator. They show you whether the market is staying inside yesterday’s range or expanding beyond it.
🔹Previous Day High (PDH) & Previous Day Low (PDL)
The Previous Day High (PDH) marks where price reached its highest point during the last full trading session, while the Previous Day Low (PDL) marks the lowest point. Together, they define the previous day’s range and help traders understand where price is trading relative to that prior structure.
When the current price of a user-selected ticker moves above the PDH, it signals that buyers are taking control and that the ticker is now trading above yesterday’s range. In the dashboard, this change triggers a 🟢 icon under the “PDH Break” column. Once the PDH Break is confirmed, the opposite PDL Break column for that same ticker becomes blank.
When the current price of the user-selected ticker moves below the PDL, it shows that sellers are taking control and that the ticker is trading below yesterday’s range. In the dashboard, this change triggers a 🔴 icon under the “PDL Break” column. Once the PDL Break is confirmed, the opposite PDH Break column for that same ticker becomes blank.
🔹 Pre-Market High (PMH) & Pre-Market Low (PML)
The Pre-Market High (PMH) and Pre-Market Low (PML) show where price reached its highest and lowest points before the main trading session begins. On most U.S. exchanges, the pre-market session is from 4:00 AM to 9:29 AM Eastern Standard Time (EST), just before the New York session opens at 9:30 AM EST. These levels are important because they reflect how traders positioned themselves during the early morning hours. Many traders use the pre-market session to react to overnight news. The PMH and PML outline that entire pre-market range, showing where buyers and sellers fought for control and where the early balance between the two sides was established before the market opens.
When the current price of a ticker moves above the Pre-Market High, it means buyers are in control and that price has pushed through the top of the pre-market range. In the dashboard, this triggers a 🟢 icon under the “PMH Break” column. Once this break is confirmed, the opposite PML Break column for that ticker becomes blank.
When the current price moves below the Pre-Market Low, it means sellers are in control and that price has fallen beneath the pre-market range. In the dashboard, this triggers a 🔴 icon under the “PML Break” column. Once a PML Break is confirmed, the opposite PMH Break column for that ticker becomes blank.
🔹Progress Bars
The LE Scanner indicator includes progress bars that show how far the current price is from key levels.
When price is between the Previous Day High (PDH) and Previous Day Low (PDL), the progress bar measures price’s distance relative to those two points.
When price is between the Pre-Market High (PMH) and Pre-Market Low (PML), the bar tracks how far price is from those pre-market boundaries.
The closer price gets to either side, the more the bar fills, giving you a quick visual sense of how close a breakout or breakdown might be. A bar that’s nearly full means price is approaching one of the levels, while a shorter bar means it’s still far away from it. By seeing this relationship directly in the dashboard, you can see which tickers are getting ready to test key levels without flipping through multiple charts.
🔹PDH Progress Bar
The PDH progress bar measures how close price is to breaking above the previous day’s high.
When the bar is nearly full, it means the current price is trading just below yesterday’s high.
When the bar is low or mostly empty, it means price is far from the PDH and trading near the middle or lower end of the previous day’s range.
Once price breaks above the PDH, the progress bar is replaced with a green confirmation icon in the PDH Break column.
🔹Previous Day Low (PDL) Progress Bar
The PDL progress bar measures how close price is to breaking below the previous day’s low.
When the bar is nearly full, it means the current price is trading just above yesterday’s low.
When the bar is low or mostly empty, it means price is far from the PDL and trading near the middle or upper end of the previous day’s range.
Once price breaks below the PDL, the progress bar is replaced with a red confirmation icon in the PDL Break column.
🔹Pre-Market High (PMH) Progress Bar
The PMH progress bar shows how close price is to breaking above the pre-market high.
When the bar is nearly full, it means the current price is trading just below the pre-market high.
When the bar is low or mostly empty, it means price is far from the PMH and trading near the middle or lower end of the pre-market range.
Once price breaks above the PMH, the progress bar is replaced with a green confirmation icon in the PMH Break column.
🔹Pre-Market Low (PML) Progress Bar
The PML progress bar shows how close price is to breaking below the pre-market low.
When the bar is nearly full, it means the current price is trading just above the pre-market low.
When the bar is low or mostly empty, it means price is far from the PML and trading near the middle or upper end of the pre-market range.
Once price breaks below the PML, the progress bar is replaced with a red confirmation icon in the PML Break column.
Trend Classification:
The LE Scanner automatically classifies each user-inputted ticker as bullish, bearish, or neutral based on how price is interacting with its key levels.
Each trend type follows a specific set of conditions and is displayed in its own column under Trend on the dashboard.
🔹 Bullish Trend
A bullish trend occurs when price has broken above both the Previous Day High (PDH) and the Pre-Market High (PMH). This shows that buyers are in full control and that the ticker is trading firmly above the prior session’s and pre-market range.
When this condition is met, the Trend column displays a green background with an upward-facing triangle icon (▲).
🔹 Bearish Trend
A bearish trend occurs when price has broken below both the Previous Day Low (PDL) and the Pre-Market Low (PML). This indicates that sellers are in control and that the ticker is trading firmly below the prior session’s and pre-market range.
When this happens, the Trend column switches to a red background with a downward-facing triangle icon (▼).
🔹 Neutral Trend
A neutral trend occurs when price is trading inside the range, meaning it hasn’t broken above the PDH/PMH or below the PDL/PML. This indicates that neither bulls nor bears has clear control, and the ticker is consolidating between the prior session’s and pre-market range.
When this condition is active, the Trend column appears with a warning sign icon (⚠️). This helps distinguish tickers that are still forming setups from those that have already shown decisive strength or weakness.
Sorting:
The LE Scanner includes a built-in sorting feature that lets you reorder the dashboard in either descending or ascending order based on one of four metrics:
% Change
Volume
Price
Trend
Sorting is handled directly in the indicator settings, where you can toggle “Sort By” and then select your preferred Sort By criteria and Order (Ascending or Descending). When enabled, the dashboard automatically repositions every ticker to match the selected sorting method.
🔹 % Change Sorting
When you sort by % Change, the dashboard ranks tickers based on their daily percentage movement relative to the previous session’s close.
If you choose descending order, the biggest gainers appear at the top.
If you choose ascending order, the biggest decliners appear at the top.
🔹 Volume Sorting
When you sort by Volume, the dashboard arranges tickers based on their total traded volume for the current session.
If you choose descending order, the highest-volume tickers appear at the top.
If you choose ascending order, the lowest-volume tickers appear at the top.
🔹 Price Sorting
When you sort by Price, the dashboard arranges tickers by their current market price.
If you choose descending order, the highest-priced tickers appear at the top.
If you choose ascending order, the lowest-priced tickers appear at the top.
🔹 Trend Sorting
When you sort by Trend, the dashboard organizes tickers based on their directional classification.
If you choose descending order, bullish tickers appear first, followed by neutral and bearish.
If you choose ascending order, bearish tickers appear first, followed by neutral and bullish.
Customization:
The LE Scanner includes several settings that let you customize how the dashboard appears on your chart. All visual and positional elements can be adjusted to fit your personal layout preferences.
🔹 Dashboard Position
You can move the dashboard anywhere on your chart using the “Table Position” setting. Options include:
Bottom-Center
Bottom-Left
Bottom-Right
Middle-Center
Middle-Left
Middle-Right
Top-Center
Top-Left
Top-Right
🔹 Dashboard Size
The dashboard size can be adjusted to be larger or smaller. Users can choose between the following options:
Tiny
Small
Normal
Large
Huge
🔹 Color Customization
All color elements in the dashboard are customizable. You can change the following:
Background Color
Border Color
Frame Color
Text Color
Bullish Trend Color
Bearish Trend Color
Important Notes:
Because the LE Scanner tracks multiple tickers and updates all data in real time, it performs several background calculations at once. On rare occasions, this can cause the following issue:
Computation Error:
Scanning up to 20 tickers at the same time requires multiple request.security() calls. This process is resource-intensive and can sometimes trigger a calculation timeout message in TradingView. If this occurs, simply force the indicator to refresh by changing one of its settings (for example, toggling a ticker off and back on) or by removing and re-adding the indicator to your chart.
Uniqueness:
The LE Scanner is unique because it combines real-time multi-ticker tracking, sortable data, and visual feedback into one tool. It can track up to 20 tickers simultaneously, automatically sort them by % change, volume, price, or trend. The built-in progress bars provide a clear visual of how close price is to breaking key levels, while the trend classification instantly shows whether each ticker is bullish, bearish, or neutral.






















